From: Dan Carpenter <dan.carpenter@oracle.com>
To: Chris Ball <chris@printf.net>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Fabio Estevam <fabio.estevam@freescale.com>,
Roman Peniaev <r.peniaev@gmail.com>,
Peter Griffin <peter.griffin@linaro.org>,
Daniel Willmann <daniel@totalueberwachung.de>,
linux-mmc@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] mmc: mxs-mmc: remove unneeded NULL check
Date: Wed, 17 Dec 2014 02:57:50 +0300 [thread overview]
Message-ID: <20141216235749.GH31467@mwanda> (raw)
Static checkers complain about the inconsistent NULL checking here:
drivers/mmc/host/mxs-mmc.c:680 mxs_mmc_probe()
warn: variable dereferenced before check 'ssp->dmach' (see line 660)
The variable can't actually be NULL so we can remove the check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index 60c4ca9..a82411a 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -677,8 +677,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
return 0;
out_free_dma:
- if (ssp->dmach)
- dma_release_channel(ssp->dmach);
+ dma_release_channel(ssp->dmach);
out_clk_disable:
clk_disable_unprepare(ssp->clk);
out_mmc_free:
next reply other threads:[~2014-12-16 23:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 23:57 Dan Carpenter [this message]
2014-12-22 9:57 ` [patch] mmc: mxs-mmc: remove unneeded NULL check Ulf Hansson
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=20141216235749.GH31467@mwanda \
--to=dan.carpenter@oracle.com \
--cc=chris@printf.net \
--cc=daniel@totalueberwachung.de \
--cc=fabio.estevam@freescale.com \
--cc=grant.likely@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=r.peniaev@gmail.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=ulf.hansson@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