diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2007-11-06 04:05:08 -0500 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2007-11-06 21:13:55 -0500 |
| commit | 07782cec9b444746859855fc310f20f254e995a0 (patch) | |
| tree | b65ec11fa710f593c9ae113a527cf863d3726eb5 | |
| parent | 0acc729ea31cb166116e350eb61694559b1d29aa (diff) | |
superhyway: Handle device_register() retval properly.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| -rw-r--r-- | drivers/sh/superhyway/superhyway.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/sh/superhyway/superhyway.c b/drivers/sh/superhyway/superhyway.c index 7d873b3b0513..4d0282b821b5 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, | |||
| 107 | static int __init superhyway_init(void) | 107 | static int __init superhyway_init(void) |
| 108 | { | 108 | { |
| 109 | struct superhyway_bus *bus; | 109 | struct superhyway_bus *bus; |
| 110 | int ret = 0; | 110 | int ret; |
| 111 | 111 | ||
| 112 | device_register(&superhyway_bus_device); | 112 | ret = device_register(&superhyway_bus_device); |
| 113 | if (unlikely(ret)) | ||
| 114 | return ret; | ||
| 113 | 115 | ||
| 114 | for (bus = superhyway_channels; bus->ops; bus++) | 116 | for (bus = superhyway_channels; bus->ops; bus++) |
| 115 | ret |= superhyway_scan_bus(bus); | 117 | ret |= superhyway_scan_bus(bus); |
| 116 | 118 | ||
| 117 | return ret; | 119 | return ret; |
| 118 | } | 120 | } |
| 119 | |||
| 120 | postcore_initcall(superhyway_init); | 121 | postcore_initcall(superhyway_init); |
| 121 | 122 | ||
| 122 | static const struct superhyway_device_id * | 123 | static const struct superhyway_device_id * |
