* [bug report] usb: cdns3: add power lost support for system resume
@ 2021-03-10 9:19 Dan Carpenter
2021-03-10 16:14 ` Frank Li
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-03-10 9:19 UTC (permalink / raw)
To: frank.li; +Cc: linux-usb
Hello Frank Li,
The patch c450e48eb570: "usb: cdns3: add power lost support for
system resume" from Feb 18, 2021, leads to the following static
checker warning:
drivers/usb/cdns3/core.c:551 cdns_resume()
error: uninitialized symbol 'ret'.
drivers/usb/cdns3/core.c
544
545 if (!role_changed) {
546 if (cdns->role == USB_ROLE_HOST)
547 ret = cdns_drd_host_on(cdns);
548 else if (cdns->role == USB_ROLE_DEVICE)
549 ret = cdns_drd_gadget_on(cdns);
What about is "ret" if the role is USB_ROLE_NONE?
550
551 if (ret)
552 return ret;
553 }
554 }
555
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bug report] usb: cdns3: add power lost support for system resume
2021-03-10 9:19 [bug report] usb: cdns3: add power lost support for system resume Dan Carpenter
@ 2021-03-10 16:14 ` Frank Li
0 siblings, 0 replies; 2+ messages in thread
From: Frank Li @ 2021-03-10 16:14 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-usb
>Caution: EXT Email
>
>Hello Frank Li,
>
>The patch c450e48eb570: "usb: cdns3: add power lost support for
>system resume" from Feb 18, 2021, leads to the following static
>checker warning:
fixed patch sent out.
>
> drivers/usb/cdns3/core.c:551 cdns_resume()
> error: uninitialized symbol 'ret'.
>
> drivers/usb/cdns3/core.c
> 544
> 545 if (!role_changed) {
> 546 if (cdns->role == USB_ROLE_HOST)
> 547 ret = cdns_drd_host_on(cdns);
> 548 else if (cdns->role == USB_ROLE_DEVICE)
> 549 ret = cdns_drd_gadget_on(cdns);
>
>What about is "ret" if the role is USB_ROLE_NONE?
>
> 550
> 551 if (ret)
> 552 return ret;
> 553 }
> 554 }
> 555
>
>
>regards,
>dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-10 16:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 9:19 [bug report] usb: cdns3: add power lost support for system resume Dan Carpenter
2021-03-10 16:14 ` Frank Li
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.