summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDhruva Gole <d-gole@ti.com>2024-03-18 20:46:33 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-04-03 16:51:37 +0200
commit3642c7ed52312ac2b95c9aba45c40e50bd8798ad (patch)
tree72aacadd8eecd2dea05dc3d70c0cd8f0a06444d1
parentafde996a33ee4dbe3692e1eff28b56c820331428 (diff)
PM: wakeup: Remove unnecessary else from device_init_wakeup()
Checkpatch warns that else is generally not necessary after a return condition which exists in the if part of this function. Hence, just to abide by what checkpatch recommends, follow it's guidelines. Signed-off-by: Dhruva Gole <d-gole@ti.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--include/linux/pm_wakeup.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h
index 428803eed798..76cd1f9f1365 100644
--- a/include/linux/pm_wakeup.h
+++ b/include/linux/pm_wakeup.h
@@ -234,11 +234,10 @@ static inline int device_init_wakeup(struct device *dev, bool enable)
if (enable) {
device_set_wakeup_capable(dev, true);
return device_wakeup_enable(dev);
- } else {
- device_wakeup_disable(dev);
- device_set_wakeup_capable(dev, false);
- return 0;
}
+ device_wakeup_disable(dev);
+ device_set_wakeup_capable(dev, false);
+ return 0;
}
#endif /* _LINUX_PM_WAKEUP_H */