* [PATCH] usb: musb: remove useless condition from musb_gadget_dequeue()
@ 2022-07-11 15:17 Andrey Strachuk
2022-07-14 14:09 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Andrey Strachuk @ 2022-07-11 15:17 UTC (permalink / raw)
To: Bin Liu
Cc: Andrey Strachuk, Greg Kroah-Hartman, Sergei Shtylyov, linux-usb,
linux-kernel, ldv-project
Comparison of 'ep' with NULL is useless since
'ep' is a result of container_of and cannot be NULL
in any reasonable scenario.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Andrey Strachuk <strochuk@ispras.ru>
Fixes: 47e9760529a9 ("USB: musb_gadget: implement set_wedge() method")
---
drivers/usb/musb/musb_gadget.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 51274b87f46c..32447b7b1976 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1271,7 +1271,7 @@ static int musb_gadget_dequeue(struct usb_ep *ep, struct usb_request *request)
int status = 0;
struct musb *musb = musb_ep->musb;
- if (!ep || !request || req->ep != musb_ep)
+ if (!request || req->ep != musb_ep)
return -EINVAL;
trace_musb_req_deq(req);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: musb: remove useless condition from musb_gadget_dequeue()
2022-07-11 15:17 [PATCH] usb: musb: remove useless condition from musb_gadget_dequeue() Andrey Strachuk
@ 2022-07-14 14:09 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2022-07-14 14:09 UTC (permalink / raw)
To: Andrey Strachuk
Cc: Bin Liu, Sergei Shtylyov, linux-usb, linux-kernel, ldv-project
On Mon, Jul 11, 2022 at 06:17:36PM +0300, Andrey Strachuk wrote:
> Comparison of 'ep' with NULL is useless since
> 'ep' is a result of container_of and cannot be NULL
> in any reasonable scenario.
Again, show the call stack as this is not called with container_of()
here.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-14 14:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11 15:17 [PATCH] usb: musb: remove useless condition from musb_gadget_dequeue() Andrey Strachuk
2022-07-14 14:09 ` Greg Kroah-Hartman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.