diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-20 09:56:08 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-20 09:56:08 +0100 |
commit | a8f25c36f7322fd089e6d006b4e3708038882561 (patch) | |
tree | e8550a9f5c085ac9dc6b5f183ea9e50ecbfd2ae5 /drivers/usb/usbip | |
parent | 225b3dc92da1a3198cf687b13435fef952757a8f (diff) | |
parent | c698ca5278934c0ae32297a8725ced2e27585d7f (diff) | |
download | linux-a8f25c36f7322fd089e6d006b4e3708038882561.tar.gz linux-a8f25c36f7322fd089e6d006b4e3708038882561.tar.bz2 linux-a8f25c36f7322fd089e6d006b4e3708038882561.zip |
Merge branch 4.16-rc6 into usb-next
We want the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/usbip')
-rw-r--r-- | drivers/usb/usbip/vudc_sysfs.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/usb/usbip/vudc_sysfs.c b/drivers/usb/usbip/vudc_sysfs.c index d86f72bbbb91..6dcd3ff655c3 100644 --- a/drivers/usb/usbip/vudc_sysfs.c +++ b/drivers/usb/usbip/vudc_sysfs.c @@ -105,10 +105,14 @@ static ssize_t usbip_sockfd_store(struct device *dev, struct device_attribute *a if (rv != 0) return -EINVAL; + if (!udc) { + dev_err(dev, "no device"); + return -ENODEV; + } spin_lock_irqsave(&udc->lock, flags); /* Don't export what we don't have */ - if (!udc || !udc->driver || !udc->pullup) { - dev_err(dev, "no device or gadget not bound"); + if (!udc->driver || !udc->pullup) { + dev_err(dev, "gadget not bound"); ret = -ENODEV; goto unlock; } |