mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
isa: refactor code to remove nested blocks
Remove nested blocks in isa_bus_init(). This will make the module easy-to-understand and make the code clearer. Previous discussion regarding this change can be found at below link: https://lore.kernel.org/all/[email protected]/ Acked-by: William Breathitt Gray <[email protected]> Suggested-by: William Breathitt Gray <[email protected]> Signed-off-by: Syed Nayyar Waris <[email protected]> Acked-by: Randy Dunlap <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Link: https://patch.msgid.link/20260701205857.GA4113@syednwaris Signed-off-by: Danilo Krummrich <[email protected]>
This commit is contained in:
1 parent
e7e09a8546
commit
0fa8e47dea
1 file changed
+9
-7
+9
-7
@@ -166,14 +166,16 @@ static int __init isa_bus_init(void)
|
||||
int error;
|
||||
|
||||
error = bus_register(&isa_bus_type);
|
||||
if (!error) {
|
||||
isa_bus = root_device_register("isa");
|
||||
if (IS_ERR(isa_bus)) {
|
||||
error = PTR_ERR(isa_bus);
|
||||
bus_unregister(&isa_bus_type);
|
||||
}
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
isa_bus = root_device_register("isa");
|
||||
if (IS_ERR(isa_bus)) {
|
||||
bus_unregister(&isa_bus_type);
|
||||
return PTR_ERR(isa_bus);
|
||||
}
|
||||
return error;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
postcore_initcall(isa_bus_init);
|
||||
Reference in new issue
Block a user