commit | 4f6e1945fecad6ac8134e9fa68b7708e55690e9e | [log] [tgz] |
---|---|---|
author | Greg Kroah-Hartman <gregkh@suse.de> | Fri Apr 20 11:29:52 2007 -0700 |
committer | Greg Kroah-Hartman <gregkh@suse.de> | Fri Apr 27 10:57:32 2007 -0700 |
tree | 367307c1307ea8ea633bef75350b7cc2df61d91d | |
parent | 8447891fe845851738439788c74b3c811578e3f9 [diff] |
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>
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 1a5a350..1d76e23 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c
@@ -603,7 +603,7 @@ 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);