[PATCH] USBATM: kzalloc conversion
Convert kmalloc + memset to kzalloc. Signed-off-by: Duncan Sands <baldrick@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0dfcd3e444
commit
9a734efec3
@@ -715,7 +715,7 @@ static int speedtch_bind(struct usbatm_data *usbatm,
|
||||
}
|
||||
}
|
||||
|
||||
instance = kmalloc(sizeof(*instance), GFP_KERNEL);
|
||||
instance = kzalloc(sizeof(*instance), GFP_KERNEL);
|
||||
|
||||
if (!instance) {
|
||||
usb_err(usbatm, "%s: no memory for instance data!\n", __func__);
|
||||
@@ -723,8 +723,6 @@ static int speedtch_bind(struct usbatm_data *usbatm,
|
||||
goto fail_release;
|
||||
}
|
||||
|
||||
memset(instance, 0, sizeof(struct speedtch_instance_data));
|
||||
|
||||
instance->usbatm = usbatm;
|
||||
|
||||
INIT_WORK(&instance->status_checker, (void *)speedtch_check_status, instance);
|
||||
|
Reference in New Issue
Block a user