diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2012-04-05 15:57:51 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-05 16:23:20 +0200 |
commit | 66bb2a7f835a28a9405f3f6571fbf34156e6bc1e (patch) | |
tree | 68e9ec3c450640c3d44b0ea42bb9e9e54eb801b2 /sound | |
parent | ASoC: imx-audmux: Fix ssi port numbers in sysfs (diff) | |
download | linux-66bb2a7f835a28a9405f3f6571fbf34156e6bc1e.tar.xz linux-66bb2a7f835a28a9405f3f6571fbf34156e6bc1e.zip |
ASoC: imx-audmux: Check for NULL pointer
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/imx/imx-audmux.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |