USB: wwan: remove an unneeded check
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 20 Apr 2012 06:33:31 +0000 (09:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2012 20:27:21 +0000 (13:27 -0700)
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>
drivers/usb/serial/usb_wwan.c

index 194c5461290d78f838c9affb548edcaaf9dcd6c0..31ba9894b6a6b6ae343610f273da97ddb83d0589 100644 (file)
@@ -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);
                }
-
        }
 }