From 7af569abc33ce09d3cb93e9b2160efff2531c59f Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Wed, 19 Jul 2006 15:39:46 +0200 Subject: [PATCH] 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 --- drivers/usb/input/appletouch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/input/appletouch.c b/drivers/usb/input/appletouch.c index 9e3f139..044faa0 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"); -- 2.7.4