diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-04-20 06:33:31 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-23 20:27:21 (GMT) |
commit | ec42899c2f9cf35e25e93c61ab9948e488de1825 (patch) | |
tree | 8c790cb6dbdbf251ab30fdbe09d19f242f6d33d9 /drivers/usb/serial/usb_wwan.c | |
parent | 4627b1ea038f2d19087c5f426df66f9cbe052f8c (diff) | |
download | linux-fsl-qoriq-ec42899c2f9cf35e25e93c61ab9948e488de1825.tar.xz |
USB: wwan: remove an unneeded check
We already verified that "status" was zero on this else branch. Since
zero is not equal to -ESHUTDOWN, this condition is always true. I
removed it and pull everything in an indent level.
This doesn't change how the code works, it's just a cleanup.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/usb_wwan.c')
-rw-r--r-- | drivers/usb/serial/usb_wwan.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c index 194c546..31ba989 100644 --- a/drivers/usb/serial/usb_wwan.c +++ b/drivers/usb/serial/usb_wwan.c @@ -307,20 +307,17 @@ static void usb_wwan_indat_callback(struct urb *urb) } /* Resubmit urb so we continue receiving */ - if (status != -ESHUTDOWN) { - err = usb_submit_urb(urb, GFP_ATOMIC); - if (err) { - if (err != -EPERM) { - printk(KERN_ERR "%s: resubmit read urb failed. " - "(%d)", __func__, err); - /* busy also in error unless we are killed */ - usb_mark_last_busy(port->serial->dev); - } - } else { + err = usb_submit_urb(urb, GFP_ATOMIC); + if (err) { + if (err != -EPERM) { + printk(KERN_ERR "%s: resubmit read urb failed. " + "(%d)", __func__, err); + /* busy also in error unless we are killed */ usb_mark_last_busy(port->serial->dev); } + } else { + usb_mark_last_busy(port->serial->dev); } - } } |