From: Stanislaw Gruszka Date: Mon, 20 Aug 2007 21:20:49 +0000 (+0200) Subject: UEAGLE: Remove sysfs files on error case X-Git-Tag: v2.6.23-rc4~29^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c132e77242c130aea81c8fc64d59f573a26bf8d;p=linux-2.6 UEAGLE: Remove sysfs files on error case Bugfix, remove sysfs files when modem fails to boot. Signed-off-by: Stanislaw Gruszka Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index a1a1c9d467..29807d048b 100644 --- a/drivers/usb/atm/ueagle-atm.c +++ b/drivers/usb/atm/ueagle-atm.c @@ -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;