Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);