From: Johannes Berg Date: Wed, 19 Jul 2006 13:39:46 +0000 (+0200) Subject: USB: appletouch: fix atp_disconnect X-Git-Tag: v2.6.18-rc5~107 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7af569abc33ce09d3cb93e9b2160efff2531c59f;p=linux-2.6 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: Johannes Berg Signed-off-by: Vojtech Pavlik Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/input/appletouch.c b/drivers/usb/input/appletouch.c index 9e3f139033..044faa07e2 100644 --- a/drivers/usb/input/appletouch.c +++ b/drivers/usb/input/appletouch.c @@ -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");