mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
[PATCH] USB: cdc-acm patch to use kzalloc
another one to use kzalloc. Please apply. Signed-off-by: Oliver Neukum <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
eb3c5ed861
commit
46f116eab8
1 changed files with 2 additions and 3 deletions
|
|
@ -827,11 +827,10 @@ skip_normal_probe:
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (!(acm = kmalloc(sizeof(struct acm), GFP_KERNEL))) {
|
||||
dev_dbg(&intf->dev, "out of memory (acm kmalloc)\n");
|
||||
if (!(acm = kzalloc(sizeof(struct acm), GFP_KERNEL))) {
|
||||
dev_dbg(&intf->dev, "out of memory (acm kzalloc)\n");
|
||||
goto alloc_fail;
|
||||
}
|
||||
memset(acm, 0, sizeof(struct acm));
|
||||
|
||||
ctrlsize = le16_to_cpu(epctrl->wMaxPacketSize);
|
||||
readsize = le16_to_cpu(epread->wMaxPacketSize);
|
||||
|
|
|
|||
Loading…
Reference in a new issue