[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
@@ -673,14 +673,12 @@ static int cxacru_bind(struct usbatm_data *usbatm_instance,
|
||||
int ret;
|
||||
|
||||
/* instance init */
|
||||
instance = kmalloc(sizeof(*instance), GFP_KERNEL);
|
||||
instance = kzalloc(sizeof(*instance), GFP_KERNEL);
|
||||
if (!instance) {
|
||||
dbg("cxacru_bind: no memory for instance data");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memset(instance, 0, sizeof(*instance));
|
||||
|
||||
instance->usbatm = usbatm_instance;
|
||||
instance->modem_type = (struct cxacru_modem_type *) id->driver_info;
|
||||
|
||||
|
Reference in New Issue
Block a user