summaryrefslogtreecommitdiff
path: root/drivers/staging/usbip/stub_rx.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-06-09 20:49:02 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-09 20:49:02 (GMT)
commitdc5a18941b4226846f0c5994e4f45bc685f7bcfe (patch)
tree8189cc7586fb875484bce2a7122f2152343904bb /drivers/staging/usbip/stub_rx.c
parent461df4ded3a143f09f9d0e870e7b16b787dc0591 (diff)
parentc773298788598a26e325bc2639877c76818943e3 (diff)
downloadlinux-fsl-qoriq-dc5a18941b4226846f0c5994e4f45bc685f7bcfe.tar.xz
Merge Linus's tree into staging-next
This was done to resolve the conflicts that were in a number of files due to changes done upstream with others done in the staging-next branch. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/usbip/stub_rx.c')
-rw-r--r--drivers/staging/usbip/stub_rx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/usbip/stub_rx.c b/drivers/staging/usbip/stub_rx.c
index bc57844..538fb9e 100644
--- a/drivers/staging/usbip/stub_rx.c
+++ b/drivers/staging/usbip/stub_rx.c
@@ -306,18 +306,18 @@ static int stub_recv_cmd_unlink(struct stub_device *sdev,
static int valid_request(struct stub_device *sdev, struct usbip_header *pdu)
{
struct usbip_device *ud = &sdev->ud;
+ int valid = 0;
if (pdu->base.devid == sdev->devid) {
spin_lock(&ud->lock);
if (ud->status == SDEV_ST_USED) {
/* A request is valid. */
- spin_unlock(&ud->lock);
- return 1;
+ valid = 1;
}
spin_unlock(&ud->lock);
}
- return 0;
+ return valid;
}
static struct stub_priv *stub_priv_alloc(struct stub_device *sdev,