At the extcon notifier, it will queue a work item, so we need to
make sure the work is initialized before it is used.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Acked-by: Li Jun <jun.li@nxp.com>
if (ret)
goto err1;
+ INIT_WORK(&cdns->role_switch_wq, cdns3_role_switch);
ret = cdns3_register_extcon(cdns);
if (ret)
goto err2;
if (ret)
goto err4;
- INIT_WORK(&cdns->role_switch_wq, cdns3_role_switch);
dev_dbg(dev, "Cadence USB3 core: probe succeed\n");
return 0;