Skip to content

Commit

Permalink
tiocx: check retval from bus_register()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Kosina authored and Tony Luck committed Mar 19, 2013
1 parent a937536 commit d7c6797
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/ia64/sn/kernel/tiocx.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,11 +490,14 @@ static int __init tiocx_init(void)
{
cnodeid_t cnodeid;
int found_tiocx_device = 0;
int err;

if (!ia64_platform_is("sn2"))
return 0;

bus_register(&tiocx_bus_type);
err = bus_register(&tiocx_bus_type);
if (err)
return err;

for (cnodeid = 0; cnodeid < num_cnodes; cnodeid++) {
nasid_t nasid;
Expand Down

0 comments on commit d7c6797

Please sign in to comment.