BZ: 32071
upper layer may call usb_ep_dequeue without knowing the power state of
device controller. Conventionally in langwell_udc, got_irq can be used
to check if current state is fully powerd. So we need to make sure got_irq
is set in langwell_ep_dequeue() before accessing any register.
Change-Id: I8e8ae491b368d5392b84ccc4658a6be66b213cb5
Signed-off-by: jzhuan5 <jin.can.zhuang@intel.com>
Reviewed-on: http://android.intel.com:8080/43587
Reviewed-by: Wu, Hao <hao.wu@intel.com>
Reviewed-by: Tang, Richard <richard.tang@intel.com>
Reviewed-by: Meng, Zhe <zhe.meng@intel.com>
Tested-by: Meng, Zhe <zhe.meng@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
dev = ep->dev;
dev_vdbg(&dev->pdev->dev, "---> %s()\n", __func__);
+ if (!dev->got_irq)
+ return -ENODEV;
+
if (!ep->desc)
return -EINVAL;