Browse Source

staging: vt6656: simplify tests of successful urb status

Use if (status) in tests for successful urb status.

This replaces (status != 0) and (status == STATUS_SUCCESS).
(STATUS_SUCCESS is defined for NDIS status in this driver, but
was being misused)

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alison Schofield 9 năm trước cách đây
mục cha
commit
7aa47db9d8
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      drivers/staging/vt6656/usbpipe.c

+ 3 - 3
drivers/staging/vt6656/usbpipe.c

@@ -116,7 +116,7 @@ static void vnt_start_interrupt_urb_complete(struct urb *urb)
 		break;
 		break;
 	}
 	}
 
 
-	if (status != STATUS_SUCCESS) {
+	if (status) {
 		priv->int_buf.in_use = false;
 		priv->int_buf.in_use = false;
 
 
 		dev_dbg(&priv->usb->dev, "%s status = %d\n", __func__, status);
 		dev_dbg(&priv->usb->dev, "%s status = %d\n", __func__, status);
@@ -221,7 +221,7 @@ int vnt_submit_rx_urb(struct vnt_private *priv, struct vnt_rcb *rcb)
 			  rcb);
 			  rcb);
 
 
 	status = usb_submit_urb(urb, GFP_ATOMIC);
 	status = usb_submit_urb(urb, GFP_ATOMIC);
-	if (status != 0) {
+	if (status) {
 		dev_dbg(&priv->usb->dev, "Submit Rx URB failed %d\n", status);
 		dev_dbg(&priv->usb->dev, "Submit Rx URB failed %d\n", status);
 		return STATUS_FAILURE;
 		return STATUS_FAILURE;
 	}
 	}
@@ -282,7 +282,7 @@ int vnt_tx_context(struct vnt_private *priv,
 			  context);
 			  context);
 
 
 	status = usb_submit_urb(urb, GFP_ATOMIC);
 	status = usb_submit_urb(urb, GFP_ATOMIC);
-	if (status != 0) {
+	if (status) {
 		dev_dbg(&priv->usb->dev, "Submit Tx URB failed %d\n", status);
 		dev_dbg(&priv->usb->dev, "Submit Tx URB failed %d\n", status);
 
 
 		context->in_use = false;
 		context->in_use = false;