mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
[PATCH] USB: microtek patch to use kzalloc
here is another one to use kzalloc. Please apply. Signed-off-by: Oliver Neukum <oliver@neukum.name> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
dcab4eaf77
commit
61eded6e06
1 changed files with 1 additions and 2 deletions
|
@ -773,11 +773,10 @@ static int mts_usb_probe(struct usb_interface *intf,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
new_desc = kmalloc(sizeof(struct mts_desc), GFP_KERNEL);
|
new_desc = kzalloc(sizeof(struct mts_desc), GFP_KERNEL);
|
||||||
if (!new_desc)
|
if (!new_desc)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
memset(new_desc, 0, sizeof(*new_desc));
|
|
||||||
new_desc->urb = usb_alloc_urb(0, GFP_KERNEL);
|
new_desc->urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||||
if (!new_desc->urb)
|
if (!new_desc->urb)
|
||||||
goto out_kfree;
|
goto out_kfree;
|
||||||
|
|
Loading…
Reference in a new issue