Skip to content

Commit

Permalink
PM: wakeup: Remove unnecessary else from device_init_wakeup()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dhruva Gole authored and Rafael J. Wysocki committed Apr 3, 2024
1 parent afde996 commit 3642c7e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions include/linux/pm_wakeup.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit 3642c7e

Please sign in to comment.