Am Sonntag, 29. Mai 2005 15:42 schrieb Giuseppe Bilotta:
> Hello all,
> 
> I have a an Acecad/[EMAIL PROTECTED] graphic tablet. There are drivers for it 
> available on the Internet (see for examples 
> http://acecad.sourceforge.net/ and the pages linked from there, 
> although the wanadoo.fr page at the top is temporarily unavailable), 
> but it seems they have not been merged into mainline. Is there a 
> particular reason for it?

The author hasn't submitted it.

While we are at it:

+static void usb_acecad_close(struct input_dev *dev)
+{
+       struct usb_acecad *acecad = dev->private;
+
+       if (!--acecad->open)
+               usb_unlink_urb(acecad->irq);
+}

Use usb_kill_urb()

+       acecad->data = usb_buffer_alloc(dev, 8, SLAB_ATOMIC, &acecad->data_dma);
+       if (!acecad->data) {
+               kfree(acecad);
+               return -ENOMEM;
+       }

May use SLAB_KERNEL

+       if (!(buf = kmalloc(63, GFP_KERNEL))) {
+               usb_buffer_free(dev, 8, acecad->data, acecad->data_dma);
+               kfree(acecad);
+               return -ENOMEM;
+       }

Leaking an urb in the error path

+static void usb_acecad_disconnect(struct usb_interface *intf)
+{
+       struct usb_acecad *acecad = usb_get_intfdata (intf);
+
+       usb_set_intfdata(intf, NULL);
+       if (acecad) {
+               usb_unlink_urb(acecad->irq);

usb_kill_urb()

+               input_unregister_device(&acecad->dev);
+               acecad_delete_files(&intf->dev);
+               usb_free_urb(acecad->irq);
+               usb_buffer_free(interface_to_usbdev(intf), 10, acecad->data, 
acecad->data_dma);
+               kfree(acecad);

What makes you sure this memory isn't accessed anymore?

+       }
+
+}
+

        HTH
                Oliver


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to