aboutsummaryrefslogtreecommitdiff
path: root/drivers/message/fusion/mptscsih.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-01-13 18:27:50 +0100
committerJames Bottomley <jejb@mulgrave.(none)>2006-01-14 10:54:58 -0600
commit1ca00bb7916cb40b8140173c23481e11d92d6f6a (patch)
treee5a16f6f230556ce43f77139c729f09a16ec95fb /drivers/message/fusion/mptscsih.c
parenteeb846cefdd842af479393a7d0fd399a29e42532 (diff)
[SCSI] fusion: kzalloc / kcalloc conversion
Convert kmalloc + memset to kzalloc or kcalloc in fusion. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r--drivers/message/fusion/mptscsih.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 93a16fa3c4b..525d9aea201 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -2162,10 +2162,9 @@ mptscsih_target_alloc(struct scsi_target *starget)
{
VirtTarget *vtarget;
- vtarget = kmalloc(sizeof(VirtTarget), GFP_KERNEL);
+ vtarget = kzalloc(sizeof(VirtTarget), GFP_KERNEL);
if (!vtarget)
return -ENOMEM;
- memset(vtarget, 0, sizeof(VirtTarget));
starget->hostdata = vtarget;
return 0;
}
@@ -2185,14 +2184,13 @@ mptscsih_slave_alloc(struct scsi_device *sdev)
VirtDevice *vdev;
struct scsi_target *starget;
- vdev = kmalloc(sizeof(VirtDevice), GFP_KERNEL);
+ vdev = kzalloc(sizeof(VirtDevice), GFP_KERNEL);
if (!vdev) {
printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n",
hd->ioc->name, sizeof(VirtDevice));
return -ENOMEM;
}
- memset(vdev, 0, sizeof(VirtDevice));
vdev->ioc_id = hd->ioc->id;
vdev->target_id = sdev->id;
vdev->bus_id = sdev->channel;