Check clk_prepare_enable() return value.
Fixes: 2c7230446bc9 ("net: phy: Add pm support to Broadcom iProc mdio mux driver")
Signed-off-by: Rayagonda Kokatanur <[email protected]>
---
drivers/net/phy/mdio-mux-bcm-iproc.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/mdio-mux-bcm-iproc.c b/drivers/net/phy/mdio-mux-bcm-iproc.c
index 88d409e48c1f..aad6809ebe39 100644
--- a/drivers/net/phy/mdio-mux-bcm-iproc.c
+++ b/drivers/net/phy/mdio-mux-bcm-iproc.c
@@ -288,8 +288,13 @@ static int mdio_mux_iproc_suspend(struct device *dev)
static int mdio_mux_iproc_resume(struct device *dev)
{
struct iproc_mdiomux_desc *md = dev_get_drvdata(dev);
+ int rc;
- clk_prepare_enable(md->core_clk);
+ rc = clk_prepare_enable(md->core_clk);
+ if (rc) {
+ dev_err(md->dev, "failed to enable core clk\n");
+ return rc;
+ }
mdio_mux_iproc_config(md);
return 0;
--
2.17.1
On Tue, Mar 17, 2020 at 10:24:35AM +0530, Rayagonda Kokatanur wrote:
> Check clk_prepare_enable() return value.
>
> Fixes: 2c7230446bc9 ("net: phy: Add pm support to Broadcom iProc mdio mux driver")
> Signed-off-by: Rayagonda Kokatanur <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Andrew
From: Rayagonda Kokatanur <[email protected]>
Date: Tue, 17 Mar 2020 10:24:35 +0530
> Check clk_prepare_enable() return value.
>
> Fixes: 2c7230446bc9 ("net: phy: Add pm support to Broadcom iProc mdio mux driver")
> Signed-off-by: Rayagonda Kokatanur <[email protected]>
Applied.
From: David Miller <[email protected]>
Date: Tue, 17 Mar 2020 21:21:27 -0700 (PDT)
> From: Rayagonda Kokatanur <[email protected]>
> Date: Tue, 17 Mar 2020 10:24:35 +0530
>
>> Check clk_prepare_enable() return value.
>>
>> Fixes: 2c7230446bc9 ("net: phy: Add pm support to Broadcom iProc mdio mux driver")
>> Signed-off-by: Rayagonda Kokatanur <[email protected]>
>
> Applied.
I also queued this up for -stable as well.