Skip to content

Commit

Permalink
driver core: bus_add_driver should return an error if no bus
Browse files Browse the repository at this point in the history
As pointed out by Dave Jones.

Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed Apr 27, 2007
1 parent 8447891 commit 4f6e194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4f6e194

Please sign in to comment.