pm80xx: remove unneeded NULL check
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): 518b863d.vBepQb4eXhQYEt/W%[email protected]
PATCH 1/1 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.
drivers/scsi/pm8001/pm8001_hwi.c +1 -1
@@ -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 */
Hi Dan,
Yes. I agree with your comment.
Regards
Anand
-----Original Message-----
From: Dan Carpenter [mailto:[email protected]]
Sent: Thursday, May 09, 2013 6:18 PM
To: [email protected]; Anand Kumar Santhanam
Cc: [email protected]; James E.J. Bottomley; [email protected]; [email protected]; [email protected]
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.
(quoted diff) +0 -0
b/drivers/scsi/pm8001/pm8001_hwi.c
index 69dd49c..683df42 100644
drivers/scsi/pm8001/pm8001_hwi.c +0 -0
@@ -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 */