[SCSI] SCSI core kmalloc2kzalloc

Change the core SCSI code to use kzalloc rather than kmalloc+memset
where possible.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
Jes Sorensen
2006-01-16 10:31:18 -05:00
committed by
父節點 b9a33cebac
當前提交 24669f75a3
共有 15 個文件被更改,包括 30 次插入59 次删除

查看文件

@@ -525,10 +525,9 @@ static int sr_probe(struct device *dev)
goto fail;
error = -ENOMEM;
cd = kmalloc(sizeof(*cd), GFP_KERNEL);
cd = kzalloc(sizeof(*cd), GFP_KERNEL);
if (!cd)
goto fail;
memset(cd, 0, sizeof(*cd));
kref_init(&cd->kref);