Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=07782cec9b444746859855fc310f20f254e995a0 Commit: 07782cec9b444746859855fc310f20f254e995a0 Parent: 0acc729ea31cb166116e350eb61694559b1d29aa Author: Paul Mundt <[EMAIL PROTECTED]> AuthorDate: Tue Nov 6 18:05:08 2007 +0900 Committer: Paul Mundt <[EMAIL PROTECTED]> CommitDate: Wed Nov 7 11:13:55 2007 +0900
superhyway: Handle device_register() retval properly. Signed-off-by: Paul Mundt <[EMAIL PROTECTED]> --- 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 7d873b3..4d0282b 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 * - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html