[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171206142323.6hbm54leg2maanbj@agrajag.zerfleddert.de>
Date: Wed, 6 Dec 2017 15:23:23 +0100
From: Tobias Jordan <Tobias.Jordan@...ktrobit.com>
To: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: ldv-project@...uxtesting.org
Subject: [PATCH] net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case
add appropriate calls to clk_disable_unprepare() by jumping to out_mdio
in case orion_mdio_probe() returns -EPROBE_DEFER.
Found by Linux Driver Verification project (linuxtesting.org).
Fixes: 3d604da1e954 net: mvmdio: get and enable optional clock
Signed-off-by: Tobias Jordan <Tobias.Jordan@...ktrobit.com>
---
drivers/net/ethernet/marvell/mvmdio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index c9798210fa0f..0495487f7b42 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -344,7 +344,8 @@ static int orion_mdio_probe(struct platform_device *pdev)
dev->regs + MVMDIO_ERR_INT_MASK);
} else if (dev->err_interrupt == -EPROBE_DEFER) {
- return -EPROBE_DEFER;
+ ret = -EPROBE_DEFER;
+ goto out_mdio;
}
if (pdev->dev.of_node)
--
2.11.0
Powered by blists - more mailing lists