Skip to content

Commit

Permalink
ASoC: imx-audmux: remove null check of audmux_base in audmux_read_file
Browse files Browse the repository at this point in the history
When audmux_read_file is called, it means the driver is already
initialised successfully, so we don't need to check audmux_base.

It also fix smatch warning:
sound/soc/fsl/imx-audmux.c:78 audmux_read_file() warn: possible memory leak of 'buf'

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Richard Zhao authored and Mark Brown committed Sep 19, 2012
1 parent f31e08e commit f3a50c9
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions sound/soc/fsl/imx-audmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ 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 f3a50c9

Please sign in to comment.