Skip to content

Commit

Permalink
ASoC: imx-audmux: Check for NULL pointer
Browse files Browse the repository at this point in the history
Check for NULL pointer before accessing it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Fabio Estevam authored and Mark Brown committed Apr 5, 2012
1 parent 00792ac commit 66bb2a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/soc/imx/imx-audmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 66bb2a7

Please sign in to comment.