Skip to content

Commit

Permalink
Input: acecad - fix a memory leak in usb_acecad_probe error path
Browse files Browse the repository at this point in the history
Add a missing usb_free_urb() in usb_acecad_probe() error path.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Axel Lin authored and Dmitry Torokhov committed Nov 11, 2010
1 parent 8c5188b commit a450319
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/input/tablet/acecad.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,13 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_

err = input_register_device(acecad->input);
if (err)
goto fail2;
goto fail3;

usb_set_intfdata(intf, acecad);

return 0;

fail3: usb_free_urb(acecad->irq);
fail2: usb_free_coherent(dev, 8, acecad->data, acecad->data_dma);
fail1: input_free_device(input_dev);
kfree(acecad);
Expand Down

0 comments on commit a450319

Please sign in to comment.