[PATCH 1/7] UEAGLE: Remove sysfs files on error case

Stanislaw Gruszka stf_xl at wp.pl
Mon Aug 20 17:20:49 EDT 2007


Bugfix, remove sysfs files when modem fails to boot. 

Signed-off-by: Stanislaw Gruszka <stf_xl at wp.pl>
---
 drivers/usb/atm/ueagle-atm.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index a1a1c9d..29807d0 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;




More information about the Usbatm mailing list