Skip to content

Commit 2ccf41a

Browse files
gmarullnashif
authored andcommitted
pm: device: handle devices not supporting requested state
If a device does not support, for example, the suspend action the subsystem should just ignore the device. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent 7ccc1a4 commit 2ccf41a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

subsys/pm/device.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ static int _pm_devices(uint32_t state)
6767
* in the right state.
6868
*/
6969
rc = pm_device_state_set(dev, state);
70-
if ((rc != -ENOSYS) && (rc != 0)) {
70+
if (rc == -ENOTSUP) {
71+
continue;
72+
} else if ((rc != -ENOSYS) && (rc != 0)) {
7173
LOG_DBG("%s did not enter %s state: %d",
7274
dev->name, pm_device_state_str(state),
7375
rc);

0 commit comments

Comments
 (0)