diff options
author | Alexander Popov <alpopov@ptsecurity.com> | 2016-04-28 13:07:22 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-28 22:28:08 +0300 |
commit | 8c7003a3b4b4afd3734cdcc39217ef22d78a4a16 (patch) | |
tree | 7656c24704aa78152ee7fd91c8ce19c0f813321a /drivers/usb/usbip/stub_dev.c | |
parent | 2bdf6ea51ce8dcd98f4f394d7203dbace01f5cbc (diff) | |
download | linux-8c7003a3b4b4afd3734cdcc39217ef22d78a4a16.tar.xz |
usbip: fix NULL pointer dereference on errors
Fix NULL pointer dereference and obsolete comments forgotten when
usbip server was converted from an interface driver to a device driver.
Signed-off-by: Alexander Popov <alpopov@ptsecurity.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/usbip/stub_dev.c')
-rw-r--r-- | drivers/usb/usbip/stub_dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/usbip/stub_dev.c b/drivers/usb/usbip/stub_dev.c index e286346041f6..c653ce533430 100644 --- a/drivers/usb/usbip/stub_dev.c +++ b/drivers/usb/usbip/stub_dev.c @@ -219,7 +219,7 @@ static void stub_device_reset(struct usbip_device *ud) dev_dbg(&udev->dev, "device reset"); - ret = usb_lock_device_for_reset(udev, sdev->interface); + ret = usb_lock_device_for_reset(udev, NULL); if (ret < 0) { dev_err(&udev->dev, "lock for reset\n"); spin_lock_irq(&ud->lock); @@ -252,7 +252,7 @@ static void stub_device_unusable(struct usbip_device *ud) /** * stub_device_alloc - allocate a new stub_device struct - * @interface: usb_interface of a new device + * @udev: usb_device of a new device * * Allocates and initializes a new stub_device struct. */ |