* [PATCH] ASoC: imx-audmux: remove null check of audmux_base in audmux_read_file
@ 2012-09-18 8:38 Richard Zhao
2012-09-19 2:53 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Richard Zhao @ 2012-09-18 8:38 UTC (permalink / raw)
To: alsa-devel; +Cc: s.hauer, shawn.guo, Richard Zhao, lrg, broonie
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>
---
sound/soc/fsl/imx-audmux.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index e7c800e..524ce62 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -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);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: imx-audmux: remove null check of audmux_base in audmux_read_file
2012-09-18 8:38 [PATCH] ASoC: imx-audmux: remove null check of audmux_base in audmux_read_file Richard Zhao
@ 2012-09-19 2:53 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-09-19 2:53 UTC (permalink / raw)
To: Richard Zhao; +Cc: alsa-devel, shawn.guo, s.hauer, lrg
On Tue, Sep 18, 2012 at 04:38:30PM +0800, Richard Zhao wrote:
> 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'
Applied, though it doesn't seem like the best fix to remove an error
check even if it should be redundant.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-19 2:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-18 8:38 [PATCH] ASoC: imx-audmux: remove null check of audmux_base in audmux_read_file Richard Zhao
2012-09-19 2:53 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).