aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/dell_rbu.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/firmware/dell_rbu.c b/drivers/firmware/dell_rbu.c
index 8136d779ddc8..08b161798443 100644
--- a/drivers/firmware/dell_rbu.c
+++ b/drivers/firmware/dell_rbu.c
@@ -718,14 +718,27 @@ static int __init dcdrbu_init(void)
718 return -EIO; 718 return -EIO;
719 } 719 }
720 720
721 sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_data_attr); 721 rc = sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_data_attr);
722 sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_image_type_attr); 722 if (rc)
723 sysfs_create_bin_file(&rbu_device->dev.kobj, 723 goto out_devreg;
724 rc = sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_image_type_attr);
725 if (rc)
726 goto out_data;
727 rc = sysfs_create_bin_file(&rbu_device->dev.kobj,
724 &rbu_packet_size_attr); 728 &rbu_packet_size_attr);
729 if (rc)
730 goto out_imtype;
725 731
726 rbu_data.entry_created = 0; 732 rbu_data.entry_created = 0;
727 return rc; 733 return 0;
728 734
735out_imtype:
736 sysfs_remove_bin_file(&rbu_device->dev.kobj, &rbu_image_type_attr);
737out_data:
738 sysfs_remove_bin_file(&rbu_device->dev.kobj, &rbu_data_attr);
739out_devreg:
740 platform_device_unregister(rbu_device);
741 return rc;
729} 742}
730 743
731static __exit void dcdrbu_exit(void) 744static __exit void dcdrbu_exit(void)