Commit 7af569ab authored by Johannes Berg's avatar Johannes Berg Committed by Greg Kroah-Hartman

USB: appletouch: fix atp_disconnect

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: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarVojtech Pavlik <vojtech@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 919aeadc
...@@ -597,9 +597,9 @@ static void atp_disconnect(struct usb_interface *iface) ...@@ -597,9 +597,9 @@ static void atp_disconnect(struct usb_interface *iface)
if (dev) { if (dev) {
usb_kill_urb(dev->urb); usb_kill_urb(dev->urb);
input_unregister_device(dev->input); input_unregister_device(dev->input);
usb_free_urb(dev->urb);
usb_buffer_free(dev->udev, dev->datalen, usb_buffer_free(dev->udev, dev->datalen,
dev->data, dev->urb->transfer_dma); dev->data, dev->urb->transfer_dma);
usb_free_urb(dev->urb);
kfree(dev); kfree(dev);
} }
printk(KERN_INFO "input: appletouch disconnected\n"); printk(KERN_INFO "input: appletouch disconnected\n");
......
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