Skip to content

Commit

Permalink
superhyway: Handle device_register() retval properly.
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Nov 7, 2007
1 parent 0acc729 commit 07782ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/sh/superhyway/superhyway.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down

0 comments on commit 07782ce

Please sign in to comment.