提交 84a34575 编写于 作者: X xinhui.pan 提交者: Linus Walleij

gpio: intel-mid: fix the incorrect return of idle callback

intel_gpio_runtime_idle should return correct error code if it do fail.
make it more correct even though -EBUSY is the most possible return value.
Signed-off-by: Nbo.he <bo.he@intel.com>
Signed-off-by: Nxinhui.pan <xinhuiX.pan@intel.com>
Signed-off-by: NDavid Cohen <david.a.cohen@linux.intel.com>
Reviewed-by: NFelipe Balbi <balbi@ti.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 cffcc92e
...@@ -394,8 +394,8 @@ static const struct irq_domain_ops intel_gpio_irq_ops = { ...@@ -394,8 +394,8 @@ static const struct irq_domain_ops intel_gpio_irq_ops = {
static int intel_gpio_runtime_idle(struct device *dev) static int intel_gpio_runtime_idle(struct device *dev)
{ {
pm_schedule_suspend(dev, 500); int err = pm_schedule_suspend(dev, 500);
return -EBUSY; return err ?: -EBUSY;
} }
static const struct dev_pm_ops intel_gpio_pm_ops = { static const struct dev_pm_ops intel_gpio_pm_ops = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册