5 Apr
2012
5 Apr
'12
12:45 p.m.
Check for NULL pointer before accessing it.
Signed-off-by: Fabio Estevam fabio.estevam@freescale.com --- sound/soc/fsl/imx-audmux.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c index d467a1b..21d67bb 100644 --- a/sound/soc/fsl/imx-audmux.c +++ b/sound/soc/fsl/imx-audmux.c @@ -76,6 +76,9 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf, if (audmux_clk) clk_prepare_enable(audmux_clk);
+ if (!audmux_base) + return -ENOSYS; + ptcr = readl(audmux_base + IMX_AUDMUX_V2_PTCR(port)); pdcr = readl(audmux_base + IMX_AUDMUX_V2_PDCR(port));
--
1.7.1