Skip to content

Commit

Permalink
[SCSI] 3w-9xxx, 3w-xxxx: memset not needed in probe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Denis Cheng authored and James Bottomley committed Apr 7, 2008
1 parent 0b6c4b1 commit ccde6b8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions drivers/scsi/3w-9xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions drivers/scsi/3w-xxxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ccde6b8

Please sign in to comment.