2020-03-17 04:56:56

by Rayagonda Kokatanur

[permalink] [raw]
Subject: [PATCH v1 1/1] net: phy: mdio-mux-bcm-iproc: check clk_prepare_enable() return value

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


2020-03-17 09:30:16

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH v1 1/1] net: phy: mdio-mux-bcm-iproc: check clk_prepare_enable() return value

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

2020-03-18 04:22:13

by David Miller

[permalink] [raw]
Subject: Re: [PATCH v1 1/1] net: phy: mdio-mux-bcm-iproc: check clk_prepare_enable() return value

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.

2020-03-18 04:23:41

by David Miller

[permalink] [raw]
Subject: Re: [PATCH v1 1/1] net: phy: mdio-mux-bcm-iproc: check clk_prepare_enable() return value

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.