浏览代码

[SCSI] 3w-9xxx, 3w-xxxx: memset not needed in probe

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>
Denis Cheng 17 年之前
父节点
当前提交
ccde6b8d62
共有 2 个文件被更改,包括 0 次插入4 次删除
  1. 0 2
      drivers/scsi/3w-9xxx.c
  2. 0 2
      drivers/scsi/3w-xxxx.c

+ 0 - 2
drivers/scsi/3w-9xxx.c

@@ -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;
 	tw_dev = (TW_Device_Extension *)host->hostdata;
 
 
-	memset(tw_dev, 0, sizeof(TW_Device_Extension));
-
 	/* Save values to device extension */
 	/* Save values to device extension */
 	tw_dev->host = host;
 	tw_dev->host = host;
 	tw_dev->tw_pci_dev = pdev;
 	tw_dev->tw_pci_dev = pdev;

+ 0 - 2
drivers/scsi/3w-xxxx.c

@@ -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;
 	tw_dev = (TW_Device_Extension *)host->hostdata;
 
 
-	memset(tw_dev, 0, sizeof(TW_Device_Extension));
-
 	/* Save values to device extension */
 	/* Save values to device extension */
 	tw_dev->host = host;
 	tw_dev->host = host;
 	tw_dev->tw_pci_dev = pdev;
 	tw_dev->tw_pci_dev = pdev;