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>
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)