From: Richard Zhao <richard.zhao@freescale.com>
To: alsa-devel@alsa-project.org
Cc: s.hauer@pengutronix.de, shawn.guo@linaro.org,
Richard Zhao <richard.zhao@freescale.com>,
lrg@ti.com, broonie@opensource.wolfsonmicro.com
Subject: [PATCH] ASoC: imx-audmux: remove null check of audmux_base in audmux_read_file
Date: Tue, 18 Sep 2012 16:38:30 +0800 [thread overview]
Message-ID: <1347957510-20590-1-git-send-email-richard.zhao@freescale.com> (raw)
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
next reply other threads:[~2012-09-18 8:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-18 8:38 Richard Zhao [this message]
2012-09-19 2:53 ` [PATCH] ASoC: imx-audmux: remove null check of audmux_base in audmux_read_file Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1347957510-20590-1-git-send-email-richard.zhao@freescale.com \
--to=richard.zhao@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@ti.com \
--cc=s.hauer@pengutronix.de \
--cc=shawn.guo@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).