From 66bb2a7f835a28a9405f3f6571fbf34156e6bc1e Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 5 Apr 2012 10:57:51 -0300 Subject: [PATCH] ASoC: imx-audmux: Check for NULL pointer Check for NULL pointer before accessing it. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown --- sound/soc/imx/imx-audmux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/imx/imx-audmux.c b/sound/soc/imx/imx-audmux.c index 912a342ef776..0fe66c3dde12 100644 --- a/sound/soc/imx/imx-audmux.c +++ b/sound/soc/imx/imx-audmux.c @@ -79,6 +79,9 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf, if (!buf) return -ENOMEM; + if (!audmux_base) + return -ENOSYS; + if (audmux_clk) clk_prepare_enable(audmux_clk); -- 2.11.0