usb: cdns3: add power lost support for system resume
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
Quoted 7 lines
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.
Quoted 24 lines
drivers/usb/cdns3/core.c:551cdns_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 }
555regards,
dan carpenter