提交 41bfcfd9 编写于 作者: J Jeff Garzik 提交者: Linus Torvalds

[PATCH] firmware/dell_rbu: handle sysfs errors

Signed-off-by: NJeff Garzik <jeff@garzik.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 c636ebdb
...@@ -718,14 +718,27 @@ static int __init dcdrbu_init(void) ...@@ -718,14 +718,27 @@ static int __init dcdrbu_init(void)
return -EIO; return -EIO;
} }
sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_data_attr); rc = sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_data_attr);
sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_image_type_attr); if (rc)
sysfs_create_bin_file(&rbu_device->dev.kobj, 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); &rbu_packet_size_attr);
if (rc)
goto out_imtype;
rbu_data.entry_created = 0; 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) static __exit void dcdrbu_exit(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册