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

Revert "driver core: Fix unbalanced device reference in drivers_probe"

This reverts commit bb34cb6b.

Wrong patch for the wrong branch, sorry for the noise...

Cc: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 4bc9ef29
...@@ -254,15 +254,13 @@ static ssize_t store_drivers_probe(struct bus_type *bus, ...@@ -254,15 +254,13 @@ static ssize_t store_drivers_probe(struct bus_type *bus,
const char *buf, size_t count) const char *buf, size_t count)
{ {
struct device *dev; struct device *dev;
int err = -EINVAL;
dev = bus_find_device_by_name(bus, NULL, buf); dev = bus_find_device_by_name(bus, NULL, buf);
if (!dev) if (!dev)
return -ENODEV; return -ENODEV;
if (bus_rescan_devices_helper(dev, NULL) == 0) if (bus_rescan_devices_helper(dev, NULL) != 0)
err = count; return -EINVAL;
put_device(dev); return count;
return err;
} }
static struct device *next_device(struct klist_iter *i) static struct device *next_device(struct klist_iter *i)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册