From: Fabio Estevam Date: Thu, 5 Apr 2012 13:57:51 +0000 (-0300) Subject: ASoC: imx-audmux: Check for NULL pointer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=66bb2a7f835a28a9405f3f6571fbf34156e6bc1e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ASoC: imx-audmux: Check for NULL pointer Check for NULL pointer before accessing it. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown --- 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);