[bug report] usbip: vhci-hcd: Set the vhci structure up to work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Yuyang Du,

The patch 03cd00d538a6: "usbip: vhci-hcd: Set the vhci structure up
to work" from Jun 8, 2017, leads to the following static checker
warning:

	drivers/usb/usbip/vhci_hcd.c:1355 vhci_hcd_probe()
	error: potentially dereferencing uninitialized 'vhci'.

drivers/usb/usbip/vhci_hcd.c
  1340          ret = usb_add_hcd(hcd_ss, 0, 0);
  1341          if (ret) {
  1342                  pr_err("usb_add_hcd ss failed %d\n", ret);
  1343                  goto put_usb3_hcd;
  1344          }
  1345  
  1346          usbip_dbg_vhci_hc("bye\n");
  1347          return 0;
  1348  
  1349  put_usb3_hcd:
  1350          usb_put_hcd(hcd_ss);
  1351  remove_usb2_hcd:
  1352          usb_remove_hcd(hcd_hs);
  1353  put_usb2_hcd:
  1354          usb_put_hcd(hcd_hs);
  1355          vhci->vhci_hcd_hs = NULL;
                ^^^^^^^^^^^^^^^^^
  1356          vhci->vhci_hcd_ss = NULL;
                ^^^^^^^^^^^^^^^^^
vhci is never initialized.

  1357          return ret;
  1358  }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux