summaryrefslogtreecommitdiff
path: root/drivers/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-11-06 18:05:08 +0900
committerPaul Mundt <lethal@linux-sh.org>2007-11-07 11:13:55 +0900
commit07782cec9b444746859855fc310f20f254e995a0 (patch)
treeb65ec11fa710f593c9ae113a527cf863d3726eb5 /drivers/sh
parent0acc729ea31cb166116e350eb61694559b1d29aa (diff)
downloadlinux-3.10-07782cec9b444746859855fc310f20f254e995a0.tar.gz
linux-3.10-07782cec9b444746859855fc310f20f254e995a0.tar.bz2
linux-3.10-07782cec9b444746859855fc310f20f254e995a0.zip
superhyway: Handle device_register() retval properly.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/sh')
-rw-r--r--drivers/sh/superhyway/superhyway.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/sh/superhyway/superhyway.c b/drivers/sh/superhyway/superhyway.c
index 7d873b3b051..4d0282b821b 100644
--- a/drivers/sh/superhyway/superhyway.c
+++ b/drivers/sh/superhyway/superhyway.c
@@ -107,16 +107,17 @@ int superhyway_add_devices(struct superhyway_bus *bus,
static int __init superhyway_init(void)
{
struct superhyway_bus *bus;
- int ret = 0;
+ int ret;
- device_register(&superhyway_bus_device);
+ ret = device_register(&superhyway_bus_device);
+ if (unlikely(ret))
+ return ret;
for (bus = superhyway_channels; bus->ops; bus++)
ret |= superhyway_scan_bus(bus);
return ret;
}
-
postcore_initcall(superhyway_init);
static const struct superhyway_device_id *