Skip to content

Commit

Permalink
[PATCH] firmware/dell_rbu: handle sysfs errors
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jeff Garzik authored and Linus Torvalds committed Oct 11, 2006
1 parent c636ebd commit 41bfcfd
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions drivers/firmware/dell_rbu.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,14 +718,27 @@ static int __init dcdrbu_init(void)
return -EIO;
}

sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_data_attr);
sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_image_type_attr);
sysfs_create_bin_file(&rbu_device->dev.kobj,
rc = sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_data_attr);
if (rc)
goto out_devreg;
rc = sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_image_type_attr);
if (rc)
goto out_data;
rc = sysfs_create_bin_file(&rbu_device->dev.kobj,
&rbu_packet_size_attr);
if (rc)
goto out_imtype;

rbu_data.entry_created = 0;
return rc;
return 0;

out_imtype:
sysfs_remove_bin_file(&rbu_device->dev.kobj, &rbu_image_type_attr);
out_data:
sysfs_remove_bin_file(&rbu_device->dev.kobj, &rbu_data_attr);
out_devreg:
platform_device_unregister(rbu_device);
return rc;
}

static __exit void dcdrbu_exit(void)
Expand Down

0 comments on commit 41bfcfd

Please sign in to comment.