Commit a4503199 authored by Axel Lin's avatar Axel Lin Committed by Dmitry Torokhov

Input: acecad - fix a memory leak in usb_acecad_probe error path

Add a missing usb_free_urb() in usb_acecad_probe() error path.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 8c5188b6
...@@ -229,12 +229,13 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_ ...@@ -229,12 +229,13 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
err = input_register_device(acecad->input); err = input_register_device(acecad->input);
if (err) if (err)
goto fail2; goto fail3;
usb_set_intfdata(intf, acecad); usb_set_intfdata(intf, acecad);
return 0; return 0;
fail3: usb_free_urb(acecad->irq);
fail2: usb_free_coherent(dev, 8, acecad->data, acecad->data_dma); fail2: usb_free_coherent(dev, 8, acecad->data, acecad->data_dma);
fail1: input_free_device(input_dev); fail1: input_free_device(input_dev);
kfree(acecad); kfree(acecad);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment