Commit 66bb2a7f authored by Fabio Estevam's avatar Fabio Estevam Committed by Mark Brown

ASoC: imx-audmux: Check for NULL pointer

Check for NULL pointer before accessing it.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 00792ac4
...@@ -79,6 +79,9 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf, ...@@ -79,6 +79,9 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
if (!buf) if (!buf)
return -ENOMEM; return -ENOMEM;
if (!audmux_base)
return -ENOSYS;
if (audmux_clk) if (audmux_clk)
clk_prepare_enable(audmux_clk); clk_prepare_enable(audmux_clk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment