From c9475cb0c358ff0dd473544280d92482df491913 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Mon, 7 Nov 2005 01:01:26 -0800 Subject: [PATCH] kfree cleanup: drivers/scsi This is the drivers/scsi/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in drivers/scsi/. Signed-off-by: Jesper Juhl Cc: James Bottomley Acked-by: Kai Makisara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/scsi/ips.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'drivers/scsi/ips.c') diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 68e5b2ab27c4..cd9b95db5a7d 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -4517,10 +4517,8 @@ ips_free(ips_ha_t * ha) ha->enq = NULL; } - if (ha->conf) { - kfree(ha->conf); - ha->conf = NULL; - } + kfree(ha->conf); + ha->conf = NULL; if (ha->adapt) { pci_free_consistent(ha->pcidev, @@ -4538,15 +4536,11 @@ ips_free(ips_ha_t * ha) ha->logical_drive_info = NULL; } - if (ha->nvram) { - kfree(ha->nvram); - ha->nvram = NULL; - } + kfree(ha->nvram); + ha->nvram = NULL; - if (ha->subsys) { - kfree(ha->subsys); - ha->subsys = NULL; - } + kfree(ha->subsys); + ha->subsys = NULL; if (ha->ioctl_data) { pci_free_consistent(ha->pcidev, ha->ioctl_len, -- cgit v1.2.3