public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] lpfc 8.3.37: Remove redundant NULL check before kfree
@ 2013-03-06 20:12 syamsidhardh
  2013-03-06 21:10 ` James Smart
  0 siblings, 1 reply; 4+ messages in thread
From: syamsidhardh @ 2013-03-06 20:12 UTC (permalink / raw)
  To: linux-scsi; +Cc: syamsidhardh, JBottomley, james.smart, Syam Sidhardhan

From: Syam Sidhardhan <s.syam@samsung.com>

kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
---
v1-> Corrected the from address.

 drivers/scsi/lpfc/lpfc_bsg.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index 32d5683..2166097 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -1129,8 +1129,7 @@ lpfc_bsg_hba_set_event(struct fc_bsg_job *job)
 	return 0; /* call job done later */
 
 job_error:
-	if (dd_data != NULL)
-		kfree(dd_data);
+	kfree(dd_data);
 
 	job->dd_data = NULL;
 	return rc;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-07 18:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-06 20:12 [PATCH v1] lpfc 8.3.37: Remove redundant NULL check before kfree syamsidhardh
2013-03-06 21:10 ` James Smart
2013-03-06 23:32   ` Elliott, Robert (Server Storage)
2013-03-07 18:05     ` James Smart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox