mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
USB: usblcd, fix memory leak
Stanse found a memory leak in lcd_probe. Instead of returning without releasing the memory, jump to the error label which frees it. http://stanse.fi.muni.cz/ Signed-off-by: Jiri Slaby <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
0f0ba794dc
commit
696a4ace98
1 changed files with 2 additions and 1 deletions
|
|
@ -313,7 +313,8 @@ static int lcd_probe(struct usb_interface *interface, const struct usb_device_id
|
|||
|
||||
if (le16_to_cpu(dev->udev->descriptor.idProduct) != 0x0001) {
|
||||
dev_warn(&interface->dev, "USBLCD model not supported.\n");
|
||||
return -ENODEV;
|
||||
retval = -ENODEV;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* set up the endpoint information */
|
||||
|
|
|
|||
Loading…
Reference in a new issue