UEAGLE: Remove sysfs files on error case
authorStanislaw Gruszka <stf_xl@wp.pl>
Mon, 20 Aug 2007 21:20:49 +0000 (23:20 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 22 Aug 2007 21:28:00 +0000 (14:28 -0700)
Bugfix, remove sysfs files when modem fails to boot.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/atm/ueagle-atm.c

index a1a1c9d467e028157c84289a9d92ccd0fe97c4b9..29807d048b0413ee0c83b2654dbdda560cf3a741 100644 (file)
@@ -1721,9 +1721,12 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,
 
        ret = uea_boot(sc);
        if (ret < 0)
-               goto error;
+               goto error_rm_grp;
 
        return 0;
+
+error_rm_grp:
+       sysfs_remove_group(&intf->dev.kobj, &attr_grp);
 error:
        kfree(sc);
        return ret;