Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alison Schofield and committed by
Greg Kroah-Hartman
7aa47db9 7cb07dc4

+3 -3
+3 -3
drivers/staging/vt6656/usbpipe.c
··· 116 116 break; 117 117 } 118 118 119 - if (status != STATUS_SUCCESS) { 119 + if (status) { 120 120 priv->int_buf.in_use = false; 121 121 122 122 dev_dbg(&priv->usb->dev, "%s status = %d\n", __func__, status); ··· 221 221 rcb); 222 222 223 223 status = usb_submit_urb(urb, GFP_ATOMIC); 224 - if (status != 0) { 224 + if (status) { 225 225 dev_dbg(&priv->usb->dev, "Submit Rx URB failed %d\n", status); 226 226 return STATUS_FAILURE; 227 227 } ··· 282 282 context); 283 283 284 284 status = usb_submit_urb(urb, GFP_ATOMIC); 285 - if (status != 0) { 285 + if (status) { 286 286 dev_dbg(&priv->usb->dev, "Submit Tx URB failed %d\n", status); 287 287 288 288 context->in_use = false;