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

Staging: usb-ip: vhci_hdc:Fix the returned error value

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>

authored by

Shan Wei and committed by
Greg Kroah-Hartman
a7cd5829 91c0f68f

+2 -2
+2 -2
drivers/staging/usbip/vhci_hcd.c
··· 594 594 595 595 if (type != PIPE_CONTROL || !ctrlreq) { 596 596 dev_err(dev, "invalid request to devnum 0\n"); 597 - ret = EINVAL; 597 + ret = -EINVAL; 598 598 goto no_need_xmit; 599 599 } 600 600 ··· 653 653 654 654 usb_hcd_giveback_urb(vhci_to_hcd(the_controller), urb, urb->status); 655 655 656 - return 0; 656 + return ret; 657 657 } 658 658 659 659 /*