From: Dan Carpenter Date: Fri, 20 Apr 2012 06:33:31 +0000 (+0300) Subject: USB: wwan: remove an unneeded check X-Git-Tag: android-x86-4.4-r1~3113^2~324 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ec42899c2f9cf35e25e93c61ab9948e488de1825;p=android-x86%2Fkernel.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c index 194c5461290d..31ba9894b6a6 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); } - } }