[SCSI] 3w-9xxx, 3w-xxxx: memset not needed in probe
authorDenis Cheng <crquan@gmail.com>
Tue, 4 Mar 2008 23:24:23 +0000 (15:24 -0800)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 7 Apr 2008 17:18:59 +0000 (12:18 -0500)
The memory return from scsi_host_alloc is alloced by kzalloc, which is
already zero initilized, so memset not needed.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Cc: Adam Radford <linuxraid@amcc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/3w-9xxx.c
drivers/scsi/3w-xxxx.c

index fa922f80635717749e4cf3f74a0344babd8232a6..51c3ebf1c7d11ecfe93bb1a68c15839e373508ea 100644 (file)
@@ -2025,8 +2025,6 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
        }
        tw_dev = (TW_Device_Extension *)host->hostdata;
 
-       memset(tw_dev, 0, sizeof(TW_Device_Extension));
-
        /* Save values to device extension */
        tw_dev->host = host;
        tw_dev->tw_pci_dev = pdev;
index a2fc06022e108f5b71c12ac4a3ab66e314eb3fb7..adb98a297210f08b8f8b3d3d4003e7aae7dabb35 100644 (file)
@@ -2286,8 +2286,6 @@ static int __devinit tw_probe(struct pci_dev *pdev, const struct pci_device_id *
        }
        tw_dev = (TW_Device_Extension *)host->hostdata;
 
-       memset(tw_dev, 0, sizeof(TW_Device_Extension));
-
        /* Save values to device extension */
        tw_dev->host = host;
        tw_dev->tw_pci_dev = pdev;