[PATCH] pwm: brcmstb: Checked clk_prepare_enable() return value

From: Florian Fainelli
Date: Thu Oct 05 2023 - 13:02:57 EST


Check the clk_prepare_enable() return value and propagate it.

Suggested-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
Signed-off-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
---
This change depends upon:

https://lore.kernel.org/all/20231004175414.1738475-1-florian.fainelli@xxxxxxxxxxxx/

drivers/pwm/pwm-brcmstb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pwm/pwm-brcmstb.c b/drivers/pwm/pwm-brcmstb.c
index a7d529bf76ad..de9cbda2e4ff 100644
--- a/drivers/pwm/pwm-brcmstb.c
+++ b/drivers/pwm/pwm-brcmstb.c
@@ -297,9 +297,7 @@ static int brcmstb_pwm_resume(struct device *dev)
{
struct brcmstb_pwm *p = dev_get_drvdata(dev);

- clk_prepare_enable(p->clk);
-
- return 0;
+ return clk_prepare_enable(p->clk);
}
#endif

--
2.34.1

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature