提交 07782cec 编写于 作者: P Paul Mundt

superhyway: Handle device_register() retval properly.

Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 0acc729e
...@@ -107,16 +107,17 @@ int superhyway_add_devices(struct superhyway_bus *bus, ...@@ -107,16 +107,17 @@ int superhyway_add_devices(struct superhyway_bus *bus,
static int __init superhyway_init(void) static int __init superhyway_init(void)
{ {
struct superhyway_bus *bus; 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++) for (bus = superhyway_channels; bus->ops; bus++)
ret |= superhyway_scan_bus(bus); ret |= superhyway_scan_bus(bus);
return ret; return ret;
} }
postcore_initcall(superhyway_init); postcore_initcall(superhyway_init);
static const struct superhyway_device_id * static const struct superhyway_device_id *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册