Skip to content

Commit

Permalink
Staging: usb-ip: vhci_hdc:Fix the returned error value
Browse files Browse the repository at this point in the history
Compared with other drivers, the "ret" should be nagative and
returned. But in vhci_hdc, it always return 0;

I dont't use the driver, and I'm not familiar with the code.
Hope the patch is helpful.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Shan Wei authored and Greg Kroah-Hartman committed Sep 15, 2009
1 parent 91c0f68 commit a7cd582
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/usbip/vhci_hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,

if (type != PIPE_CONTROL || !ctrlreq) {
dev_err(dev, "invalid request to devnum 0\n");
ret = EINVAL;
ret = -EINVAL;
goto no_need_xmit;
}

Expand Down Expand Up @@ -653,7 +653,7 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,

usb_hcd_giveback_urb(vhci_to_hcd(the_controller), urb, urb->status);

return 0;
return ret;
}

/*
Expand Down

0 comments on commit a7cd582

Please sign in to comment.