[bug report] usb: gadget: Add UDC driver for tegra XUSB device mode controller

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

 



Hello Nagarjuna Kristam,

This is a semi-automatic email about new static checker warnings.

The patch 49db427232fe: "usb: gadget: Add UDC driver for tegra XUSB
device mode controller" from Oct 18, 2019, leads to the following
Smatch complaint:

    drivers/usb/gadget/udc/tegra-xudc.c:2683 tegra_xudc_handle_transfer_completion()
    warn: variable dereferenced before check 'ep->desc' (see line 2681)

drivers/usb/gadget/udc/tegra-xudc.c
  2680	
  2681			tegra_xudc_req_done(ep, req, 0);
                                            ^^
ep->desc gets dereferenced inside the function.

  2682	
  2683			if (ep->desc && usb_endpoint_xfer_control(ep->desc))
                            ^^^^^^^^
So this check is too late.  Hopefully, the NULL check can be deleted?

  2684				tegra_xudc_ep0_req_done(xudc);
  2685	

regards,
dan carpenter



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux