diff options
author | 2021-01-23 14:25:00 +0000 | |
---|---|---|
committer | 2021-02-05 10:27:18 +0100 | |
commit | ae2938c358430beab098fbfac843532c25b36372 (patch) | |
tree | b046c47663acd81e2a60887c165c58202bcaaf0c /drivers/usb/cdns3/cdns3-imx.c | |
parent | usb: musb: Fix runtime PM race in musb_queue_resume_work (diff) | |
download | linux-dev-ae2938c358430beab098fbfac843532c25b36372.tar.xz linux-dev-ae2938c358430beab098fbfac843532c25b36372.zip |
usb: musb: Fix NULL check on struct musb_request field
The 'request' variable is a pointer to the 'request' field of the
struct musb_request 'req' pointer. It only worked until now because
the 'request' field is the first one in the musb_request structure, but
as soon as that changes, the check will be invalid.
Fix it preventively by doing the NULL-check on the 'req' pointer
instead.
Suggested-by: Maarten ter Huurne <maarten@treewalker.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20210123142502.16980-2-paul@crapouillou.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions