Hi Dan,

Yes. I agree with your comment.
Acked-by: anandkumar_santha...@pmcs.com

Regards
Anand

-----Original Message-----
From: Dan Carpenter [mailto:dan.carpen...@oracle.com] 
Sent: Thursday, May 09, 2013 6:18 PM
To: xjtu...@gmail.com; Anand Kumar Santhanam
Cc: lindar_...@usish.com; James E.J. Bottomley;
linux-scsi@vger.kernel.org; kernel-janit...@vger.kernel.org;
dan.carpen...@oracle.com
Subject: [patch] [SCSI] pm80xx: remove unneeded NULL check

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.carpen...@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 */
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to