linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case
@ 2017-12-06 14:23 Tobias Jordan
  2017-12-06 16:03 ` Andrew Lunn
  2017-12-07 18:41 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Tobias Jordan @ 2017-12-06 14:23 UTC (permalink / raw)
  To: netdev, linux-kernel; +Cc: ldv-project

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@elektrobit.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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case
  2017-12-06 14:23 [PATCH] net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case Tobias Jordan
@ 2017-12-06 16:03 ` Andrew Lunn
  2017-12-07 18:41 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2017-12-06 16:03 UTC (permalink / raw)
  To: Tobias Jordan; +Cc: netdev, linux-kernel, ldv-project

On Wed, Dec 06, 2017 at 03:23:23PM +0100, Tobias Jordan wrote:
> 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@elektrobit.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Thanks Tobais

    Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case
  2017-12-06 14:23 [PATCH] net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case Tobias Jordan
  2017-12-06 16:03 ` Andrew Lunn
@ 2017-12-07 18:41 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-12-07 18:41 UTC (permalink / raw)
  To: Tobias.Jordan; +Cc: netdev, linux-kernel, ldv-project

From: Tobias Jordan <Tobias.Jordan@elektrobit.com>
Date: Wed, 6 Dec 2017 15:23:23 +0100

> 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@elektrobit.com>

Applied, but please in the future format your Fixes: tag properly.

You need to put the commit message header line inside of parenthesis
and double quotes, like this:

Fixes: 3d604da1e954 ("net: mvmdio: get and enable optional clock")

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-07 18:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 14:23 [PATCH] net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case Tobias Jordan
2017-12-06 16:03 ` Andrew Lunn
2017-12-07 18:41 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).