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 12:28:08 -0700 |
commit | 8c7003a3b4b4afd3734cdcc39217ef22d78a4a16 (patch) | |
tree | 7656c24704aa78152ee7fd91c8ce19c0f813321a /drivers/usb/usbip/stub_tx.c | |
parent | 2bdf6ea51ce8dcd98f4f394d7203dbace01f5cbc (diff) | |
download | linux-8c7003a3b4b4afd3734cdcc39217ef22d78a4a16.tar.gz linux-8c7003a3b4b4afd3734cdcc39217ef22d78a4a16.tar.bz2 linux-8c7003a3b4b4afd3734cdcc39217ef22d78a4a16.zip |
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_tx.c')
-rw-r--r-- | drivers/usb/usbip/stub_tx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/usbip/stub_tx.c b/drivers/usb/usbip/stub_tx.c index dbcabc9dbe0d..af1edad4683a 100644 --- a/drivers/usb/usbip/stub_tx.c +++ b/drivers/usb/usbip/stub_tx.c @@ -229,7 +229,7 @@ static int stub_send_ret_submit(struct stub_device *sdev) } if (txsize != sizeof(pdu_header) + urb->actual_length) { - dev_err(&sdev->interface->dev, + dev_err(&sdev->udev->dev, "actual length of urb %d does not match iso packet sizes %zu\n", urb->actual_length, txsize-sizeof(pdu_header)); @@ -261,7 +261,7 @@ static int stub_send_ret_submit(struct stub_device *sdev) ret = kernel_sendmsg(sdev->ud.tcp_socket, &msg, iov, iovnum, txsize); if (ret != txsize) { - dev_err(&sdev->interface->dev, + dev_err(&sdev->udev->dev, "sendmsg failed!, retval %d for %zd\n", ret, txsize); kfree(iov); @@ -336,7 +336,7 @@ static int stub_send_ret_unlink(struct stub_device *sdev) ret = kernel_sendmsg(sdev->ud.tcp_socket, &msg, iov, 1, txsize); if (ret != txsize) { - dev_err(&sdev->interface->dev, + dev_err(&sdev->udev->dev, "sendmsg failed!, retval %d for %zd\n", ret, txsize); usbip_event_add(&sdev->ud, SDEV_EVENT_ERROR_TCP); |