Loading
phy: ti: da8xx-usb: Handle devm_pm_runtime_enable() errors
devm_pm_runtime_enable() can fail due to memory allocation. The current code ignores its return value after calling pm_runtime_set_active(), leaving the device in an inconsistent state if runtime PM initialization fails. Check the return value of devm_pm_runtime_enable() and return on failure. Also move the declaration of 'ret' to the function scope to support this check. Fixes: ee8e41b5 ("phy: ti: phy-da8xx-usb: Add runtime PM support") Suggested-by:Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by:
Haotian Zhang <vulab@iscas.ac.cn> Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20251124105734.1027-1-vulab@iscas.ac.cn Signed-off-by:
Vinod Koul <vkoul@kernel.org>