aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/cdns3/cdns3-gadget.c
diff options
context:
space:
mode:
authorPawel Laszczak <[email protected]>2021-05-05 05:58:54 +0000
committerPeter Chen <[email protected]>2021-05-11 06:12:54 +0000
commit4ae08bc23e1b29894b1af34990409a454cccf242 (patch)
treea5f57b5fa086c032e8014a86359c642d5c5bc977 /drivers/usb/cdns3/cdns3-gadget.c
parentusb: cdns3: Corrected comment to align with kernel-doc comment (diff)
downloadkernel-4ae08bc23e1b29894b1af34990409a454cccf242.tar.gz
kernel-4ae08bc23e1b29894b1af34990409a454cccf242.zip
usb: cdnsp: Useless condition has been removed
This code generates a Smatch warning: drivers/usb/cdns3/cdnsp-mem.c:1085 cdnsp_mem_cleanup() warn: variable dereferenced before check 'pdev->dcbaa' (see line 1067) The unchecked dereference happens inside the function when we call: cdnsp_free_priv_device(pdev); But fortunately, the "pdev->dcbaa" pointer can never be NULL so it does not lead to a runtime issue. We can just remove the NULL check which silences the warning and makes the code consistent. Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Pawel Laszczak <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Peter Chen <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-gadget.c')
0 files changed, 0 insertions, 0 deletions