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: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:
parent
a937536b86
commit
d7c6797fbc
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue