diff options
author | Jiri Kosina <jkosina@suse.cz> | 2013-03-19 10:36:13 +0100 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2013-03-19 16:14:52 -0700 |
commit | d7c6797fbc2c2efa7573817685d2a76fd274d2de (patch) | |
tree | 9ce2e75a774aee71509f8f98cd9b24f60a2d2429 | |
parent | a937536b868b8369b98967929045f1df54234323 (diff) | |
download | linux-stable-d7c6797fbc2c2efa7573817685d2a76fd274d2de.tar.gz linux-stable-d7c6797fbc2c2efa7573817685d2a76fd274d2de.tar.bz2 linux-stable-d7c6797fbc2c2efa7573817685d2a76fd274d2de.zip |
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>
-rw-r--r-- | arch/ia64/sn/kernel/tiocx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c index 14c1711238c0..e35f6485c1fd 100644 --- a/arch/ia64/sn/kernel/tiocx.c +++ b/arch/ia64/sn/kernel/tiocx.c @@ -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; |