[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:
Duncan Sands
2006-01-13 09:38:22 +01:00
committed by Greg Kroah-Hartman
parent 0dfcd3e444
commit 9a734efec3
3 changed files with 5 additions and 11 deletions

View File

@@ -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);