linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug report] usb: dwc2: host: Fix ISOC flow in DDMA mode
@ 2024-04-05 10:09 Dan Carpenter
  2024-04-08  6:04 ` Minas Harutyunyan
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2024-04-05 10:09 UTC (permalink / raw)
  To: Minas.Harutyunyan; +Cc: linux-usb

Hello Minas Harutyunyan,

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

Commit b258e4268850 ("usb: dwc2: host: Fix ISOC flow in DDMA mode")
from Mar 13, 2024, leads to the following Smatch complaint:

    drivers/usb/dwc2/hcd_ddma.c:874 dwc2_cmpl_host_isoc_dma_desc()
    warn: variable dereferenced before check 'qtd->urb' (see line 870)

drivers/usb/dwc2/hcd_ddma.c
   869		u16 frame_desc_idx;
   870		struct urb *usb_urb = qtd->urb->priv;
                                      ^^^^^^^^^^
The patch adds a dereference

   871		u16 remain = 0;
   872		int rc = 0;
   873	
   874		if (!qtd->urb)
                    ^^^^^^^^^
The existing check is too late now

   875			return -EINVAL;
   876	

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-08  7:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-05 10:09 [bug report] usb: dwc2: host: Fix ISOC flow in DDMA mode Dan Carpenter
2024-04-08  6:04 ` Minas Harutyunyan
2024-04-08  7:49   ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).