mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07: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/20260504063518.515620-1-wbg@kernel.org/ Acked-by: William Breathitt Gray <wbg@kernel.org> Suggested-by: William Breathitt Gray <wbg@kernel.org> Signed-off-by: Syed Nayyar Waris <syednwaris@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/all/20260504063518.515620-1-wbg@kernel.org/ Link: https://patch.msgid.link/20260701205857.GA4113@syednwaris Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
committed by
Danilo Krummrich
parent
e7e09a8546
commit
0fa8e47dea
+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