Skip to content

Commit

Permalink
USB: appletouch: fix atp_disconnect
Browse files Browse the repository at this point in the history
appletouch uses urb->transfer_dma after having freed the urb, this shows
up only if the system is compiled with slab debugging. This patch fixes
it by reordering the free calls.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Johannes Berg authored and Greg Kroah-Hartman committed Aug 11, 2006
1 parent 919aead commit 7af569a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/input/appletouch.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,9 +597,9 @@ static void atp_disconnect(struct usb_interface *iface)
if (dev) {
usb_kill_urb(dev->urb);
input_unregister_device(dev->input);
usb_free_urb(dev->urb);
usb_buffer_free(dev->udev, dev->datalen,
dev->data, dev->urb->transfer_dma);
usb_free_urb(dev->urb);
kfree(dev);
}
printk(KERN_INFO "input: appletouch disconnected\n");
Expand Down

0 comments on commit 7af569a

Please sign in to comment.