提交 4f6e1945 编写于 作者: G Greg Kroah-Hartman

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: NGreg Kroah-Hartman <gregkh@suse.de>
上级 8447891f
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册