[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:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user