Thanks, Could you try this patch ?
It's your fix with some cleanning. Matthieu
Index: linux-2.6.16/drivers/usb/atm/ueagle-atm.c =================================================================== --- linux-2.6.16.orig/drivers/usb/atm/ueagle-atm.c 2006-10-09 21:28:20.000000000 +0200 +++ linux-2.6.16/drivers/usb/atm/ueagle-atm.c 2006-10-09 21:33:58.000000000 +0200 @@ -1639,16 +1639,12 @@ &dev_attr_stat_dscorr.attr, &dev_attr_stat_usunc.attr, &dev_attr_stat_dsunc.attr, + NULL, }; static struct attribute_group attr_grp = { .attrs = attrs, }; -static int create_fs_entries(struct usb_interface *intf) -{ - return sysfs_create_group(&intf->dev.kobj, &attr_grp); -} - static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf, const struct usb_device_id *id) { @@ -1708,31 +1704,25 @@ } } + ret = sysfs_create_group(&intf->dev.kobj, &attr_grp); + if (ret < 0) + goto error; + ret = uea_boot(sc); - if (ret < 0) { - kfree(sc); - return ret; - } + if (ret < 0) + goto error; - ret = create_fs_entries(intf); - if (ret) { - uea_stop(sc); - kfree(sc); - return ret; - } return 0; -} - -static void destroy_fs_entries(struct usb_interface *intf) -{ - sysfs_remove_group(&intf->dev.kobj, &attr_grp); +error: + kfree(sc); + return ret; } static void uea_unbind(struct usbatm_data *usbatm, struct usb_interface *intf) { struct uea_softc *sc = usbatm->driver_data; - destroy_fs_entries(intf); + sysfs_remove_group(&intf->dev.kobj, &attr_grp); uea_stop(sc); kfree(sc); }
_______________________________________________ Ueagleatm-dev mailing list Ueagleatm-dev@gna.org https://mail.gna.org/listinfo/ueagleatm-dev