diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-07 11:26:15 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-07 11:26:15 -0800 |
commit | f4c9485f9f5d816bb21333b517d0e3d2746dd285 (patch) | |
tree | 5e5b723e800ac50b8a0affdd6cc0c330dd16ffd9 | |
parent | 4bc9ef297e3e85deeae81d1156fac89012c7db9a (diff) | |
download | op-kernel-dev-f4c9485f9f5d816bb21333b517d0e3d2746dd285.zip op-kernel-dev-f4c9485f9f5d816bb21333b517d0e3d2746dd285.tar.gz |
Revert "driver core: Fix unbalanced device reference in drivers_probe"
This reverts commit bb34cb6bbd287b57e955bc5cfd42fcde6aaca279.
Wrong patch for the wrong branch, sorry for the noise...
Cc: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/base/bus.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 876bae5..83e910a 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -254,15 +254,13 @@ static ssize_t store_drivers_probe(struct bus_type *bus, const char *buf, size_t count) { struct device *dev; - int err = -EINVAL; dev = bus_find_device_by_name(bus, NULL, buf); if (!dev) return -ENODEV; - if (bus_rescan_devices_helper(dev, NULL) == 0) - err = count; - put_device(dev); - return err; + if (bus_rescan_devices_helper(dev, NULL) != 0) + return -EINVAL; + return count; } static struct device *next_device(struct klist_iter *i) |