aboutsummaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-01-16 22:06:57 +0000
committerMark Brown <broonie@kernel.org>2015-01-16 22:06:57 +0000
commita47897538c3e1f71c35691a1f73e73dd9149977c (patch)
tree462c858397564058dbc996c6ab71613b6d1e35c8 /drivers/base
parent7368857a8eed5144e56e65713970764ef0f2f0b8 (diff)
parenta2ab9187600ddca13da9e5c20e3abb92ea885ddd (diff)
Merge tag 'v3.14.29' into linux-linaro-lsk-v3.14
This is the 3.14.29 stable release
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/bus.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 59dc8086e4fa..45d0fa78981c 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -254,13 +254,15 @@ 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)
- return -EINVAL;
- return count;
+ if (bus_rescan_devices_helper(dev, NULL) == 0)
+ err = count;
+ put_device(dev);
+ return err;
}
static struct device *next_device(struct klist_iter *i)