summaryrefslogtreecommitdiffstats
path: root/drivers/usb/usbip
diff options
context:
space:
mode:
authorYuyang Du <yuyang.du@intel.com>2017-06-27 17:44:26 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-27 17:57:50 +0200
commitf0d657e80d788c43ff4a5dbeb47d2ad60059f1c7 (patch)
treef2f533361b53e2d4e29c7c1b07d78114a3ce2480 /drivers/usb/usbip
parentusb: core: read USB ports from DT in the usbport LED trigger driver (diff)
downloadlinux-f0d657e80d788c43ff4a5dbeb47d2ad60059f1c7.tar.xz
linux-f0d657e80d788c43ff4a5dbeb47d2ad60059f1c7.zip
usbip: Fix uninitialized variable bug in vhci
The patch 03cd00d538a6: "usbip: vhci-hcd: Set the vhci structure up to work" introduced a bug which uses a vairable without initialization in error handling code. Fix it. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Yuyang Du <yuyang.du@intel.com> Acked-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/usbip')
-rw-r--r--drivers/usb/usbip/vhci_hcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c
index 64c38603df7b..2c4b2fd40406 100644
--- a/drivers/usb/usbip/vhci_hcd.c
+++ b/drivers/usb/usbip/vhci_hcd.c
@@ -1301,7 +1301,7 @@ static struct hc_driver vhci_hc_driver = {
static int vhci_hcd_probe(struct platform_device *pdev)
{
- struct vhci *vhci;
+ struct vhci *vhci = *((void **)dev_get_platdata(&pdev->dev));
struct usb_hcd *hcd_hs;
struct usb_hcd *hcd_ss;
int ret;