Commit d7c6797f authored by Jiri Kosina's avatar Jiri Kosina Committed by Tony Luck

tiocx: check retval from bus_register()

Properly check return value from bus_register() and propagate it out of
tiocx_init() in case of failure.
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent a937536b
...@@ -490,11 +490,14 @@ static int __init tiocx_init(void) ...@@ -490,11 +490,14 @@ static int __init tiocx_init(void)
{ {
cnodeid_t cnodeid; cnodeid_t cnodeid;
int found_tiocx_device = 0; int found_tiocx_device = 0;
int err;
if (!ia64_platform_is("sn2")) if (!ia64_platform_is("sn2"))
return 0; return 0;
bus_register(&tiocx_bus_type); err = bus_register(&tiocx_bus_type);
if (err)
return err;
for (cnodeid = 0; cnodeid < num_cnodes; cnodeid++) { for (cnodeid = 0; cnodeid < num_cnodes; cnodeid++) {
nasid_t nasid; nasid_t nasid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment