From: Dan Carpenter <dan.carpenter@oracle.com>
To: xjtuwjp@gmail.com, Anand Kumar S <AnandKumar.Santhanam@pmcs.com>
Cc: lindar_liu@usish.com,
"James E.J. Bottomley" <JBottomley@parallels.com>,
linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org,
dan.carpenter@oracle.com
Subject: [patch] [SCSI] pm80xx: remove unneeded NULL check
Date: Thu, 9 May 2013 15:48:13 +0300 [thread overview]
Message-ID: <20130509124813.GA5132@elgon.mountain> (raw)
In-Reply-To: <518b863d.vBepQb4eXhQYEt/W%fengguang.wu@intel.com>
Coccinelle complains about the inconsistent NULL checking on "t". It
turns out the check isn't needed because we verified that "t" is
non-NULL at the start of the function.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index 69dd49c..683df42 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -3740,7 +3740,7 @@ int pm8001_mpi_task_abort_resp(struct pm8001_hba_info *pm8001_ha, void *piomb)
pm8001_ccb_task_free(pm8001_ha, t, ccb, tag);
mb();
- if ((pm8001_dev->id & NCQ_ABORT_ALL_FLAG) && t) {
+ if (pm8001_dev->id & NCQ_ABORT_ALL_FLAG) {
pm8001_tag_free(pm8001_ha, tag);
sas_free_task(t);
/* clear the flag */
next parent reply other threads:[~2013-05-09 12:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <518b863d.vBepQb4eXhQYEt/W%fengguang.wu@intel.com>
2013-05-09 12:48 ` Dan Carpenter [this message]
2013-05-09 12:51 ` [patch] [SCSI] pm80xx: remove unneeded NULL check Anand Kumar Santhanam
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=20130509124813.GA5132@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=AnandKumar.Santhanam@pmcs.com \
--cc=JBottomley@parallels.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lindar_liu@usish.com \
--cc=linux-scsi@vger.kernel.org \
--cc=xjtuwjp@gmail.com \
/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