Commit 78b4735e authored by Dennis Grijalva's avatar Dennis Grijalva Committed by Carles Cufi
Browse files

drivers: led: led_pwm: Fix PM callback error logging



If the underlying PWM device does not have a PM callback,
the PWM LED driver will flood the console with error logs.
The change ignores the error if there is no PM callback
for the PWM device.

Signed-off-by: default avatarDennis Grijalva <dennisgrijalva@meta.com>
parent 30b8d4ca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ static int led_pwm_pm_action(const struct device *dev,

		err = pm_device_action_run(led->dev, action);
		if (err && (err != -EALREADY)) {
			LOG_ERR("Cannot switch PWM %p power state", led->dev);
			LOG_DBG("Cannot switch PWM %p power state (err = %d)", led->dev, err);
		}
	}