summaryrefslogtreecommitdiffstats
path: root/arch/ia64/sn
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2013-03-19 10:36:13 +0100
committerTony Luck <tony.luck@intel.com>2013-03-19 16:14:52 -0700
commitd7c6797fbc2c2efa7573817685d2a76fd274d2de (patch)
tree9ce2e75a774aee71509f8f98cd9b24f60a2d2429 /arch/ia64/sn
parenta937536b868b8369b98967929045f1df54234323 (diff)
downloadop-kernel-dev-d7c6797fbc2c2efa7573817685d2a76fd274d2de.zip
op-kernel-dev-d7c6797fbc2c2efa7573817685d2a76fd274d2de.tar.gz
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>
Diffstat (limited to 'arch/ia64/sn')
-rw-r--r--arch/ia64/sn/kernel/tiocx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c
index 14c1711..e35f648 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;
OpenPOWER on IntegriCloud