diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-20 20:29:52 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-27 19:57:32 +0200 |
commit | 4f6e1945fecad6ac8134e9fa68b7708e55690e9e (patch) | |
tree | 367307c1307ea8ea633bef75350b7cc2df61d91d /drivers/base | |
parent | debugfs: Add debugfs_create_u64() (diff) | |
download | linux-4f6e1945fecad6ac8134e9fa68b7708e55690e9e.tar.xz linux-4f6e1945fecad6ac8134e9fa68b7708e55690e9e.zip |
driver core: bus_add_driver should return an error if no bus
As pointed out by Dave Jones.
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/bus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 1a5a350eca15..1d76e2349654 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -603,7 +603,7 @@ int bus_add_driver(struct device_driver *drv) int error = 0; if (!bus) - return 0; + return -EINVAL; pr_debug("bus %s: add driver %s\n", bus->name, drv->name); error = kobject_set_name(&drv->kobj, "%s", drv->name); |