lkml.org 
[lkml]   [2020]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v1 1/1] net: phy: mdio-mux-bcm-iproc: check clk_prepare_enable() return value
    Date
    Check clk_prepare_enable() return value.

    Fixes: 2c7230446bc9 ("net: phy: Add pm support to Broadcom iProc mdio mux driver")
    Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
    ---
    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
    \
     
     \ /
      Last update: 2020-03-17 05:55    [W:14.187 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site