* [PATCH 1/1] scsi: remove redundant NULL check before kfree
@ 2015-06-23 3:42 Maninder Singh
2015-06-23 5:59 ` Hannes Reinecke
0 siblings, 1 reply; 2+ messages in thread
From: Maninder Singh @ 2015-06-23 3:42 UTC (permalink / raw)
To: JBottomley, hare, hch, michaelc, martin.petersen, linux-scsi,
linux-kernel
Cc: pankaj.m, Maninder Singh
There is no need of NULL check before kfree,
So removing the same.
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Rohit Thapliyal <r.thapliyal@samsung.com>
---
drivers/scsi/aic94xx/aic94xx_init.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
index 4b135cc..a449fde 100644
--- a/drivers/scsi/aic94xx/aic94xx_init.c
+++ b/drivers/scsi/aic94xx/aic94xx_init.c
@@ -589,8 +589,7 @@ static void asd_destroy_ha_caches(struct asd_ha_struct *asd_ha)
if (asd_ha->hw_prof.scb_ext)
asd_free_coherent(asd_ha, asd_ha->hw_prof.scb_ext);
- if (asd_ha->hw_prof.ddb_bitmap)
- kfree(asd_ha->hw_prof.ddb_bitmap);
+ kfree(asd_ha->hw_prof.ddb_bitmap);
asd_ha->hw_prof.ddb_bitmap = NULL;
for (i = 0; i < ASD_MAX_PHYS; i++) {
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] scsi: remove redundant NULL check before kfree
2015-06-23 3:42 [PATCH 1/1] scsi: remove redundant NULL check before kfree Maninder Singh
@ 2015-06-23 5:59 ` Hannes Reinecke
0 siblings, 0 replies; 2+ messages in thread
From: Hannes Reinecke @ 2015-06-23 5:59 UTC (permalink / raw)
To: Maninder Singh, JBottomley, hch, michaelc, martin.petersen,
linux-scsi, linux-kernel
Cc: pankaj.m
On 06/23/2015 05:42 AM, Maninder Singh wrote:
> There is no need of NULL check before kfree,
> So removing the same.
>
> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
> Reviewed-by: Rohit Thapliyal <r.thapliyal@samsung.com>
If you insist ...
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-23 5:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-23 3:42 [PATCH 1/1] scsi: remove redundant NULL check before kfree Maninder Singh
2015-06-23 5:59 ` Hannes Reinecke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).