Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1444663 > unrolled thread

[PATCH] i2c: efm32: fix a failure path in efm32_i2c_probe()

Started byAlexey Khoroshilov <khoroshilov@ispras.ru>
First post2016-07-16 01:40 +0200
Last post2016-07-19 06:30 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] i2c: efm32: fix a failure path in efm32_i2c_probe() Alexey Khoroshilov <khoroshilov@ispras.ru> - 2016-07-16 01:40 +0200
    Re: [PATCH] i2c: efm32: fix a failure path in efm32_i2c_probe() Uwe Kleine-König   <u.kleine-koenig@pengutronix.de> - 2016-07-16 11:00 +0200
    Re: [PATCH] i2c: efm32: fix a failure path in efm32_i2c_probe() Wolfram Sang <wsa@the-dreams.de> - 2016-07-19 06:30 +0200

#1444663 — [PATCH] i2c: efm32: fix a failure path in efm32_i2c_probe()

FromAlexey Khoroshilov <khoroshilov@ispras.ru>
Date2016-07-16 01:40 +0200
Subject[PATCH] i2c: efm32: fix a failure path in efm32_i2c_probe()
Message-ID<rVkS5-4J0-5@gated-at.bofh.it>
There is the only failure path in efm32_i2c_probe(),
where clk_disable_unprepare() is missed.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
 drivers/i2c/busses/i2c-efm32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-efm32.c b/drivers/i2c/busses/i2c-efm32.c
index 8eff62738877..e253598d764c 100644
--- a/drivers/i2c/busses/i2c-efm32.c
+++ b/drivers/i2c/busses/i2c-efm32.c
@@ -433,7 +433,7 @@ static int efm32_i2c_probe(struct platform_device *pdev)
 	ret = request_irq(ddata->irq, efm32_i2c_irq, 0, DRIVER_NAME, ddata);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "failed to request irq (%d)\n", ret);
-		return ret;
+		goto err_disable_clk;
 	}
 
 	ret = i2c_add_adapter(&ddata->adapter);
-- 
1.9.1

[toc] | [next] | [standalone]


#1444786

FromUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date2016-07-16 11:00 +0200
Message-ID<rVtC2-1At-13@gated-at.bofh.it>
In reply to#1444663
On Sat, Jul 16, 2016 at 02:36:38AM +0300, Alexey Khoroshilov wrote:
> There is the only failure path in efm32_i2c_probe(),
> where clk_disable_unprepare() is missed.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>

oops, this is wrong since the beginning.

Fixes: 1b5b23718b84 ("i2c: efm32: new bus driver")
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[toc] | [prev] | [next] | [standalone]


#1446012

FromWolfram Sang <wsa@the-dreams.de>
Date2016-07-19 06:30 +0200
Message-ID<rWuPn-7DW-3@gated-at.bofh.it>
In reply to#1444663

[Multipart message — attachments visible in raw view] — view raw

On Sat, Jul 16, 2016 at 02:36:38AM +0300, Alexey Khoroshilov wrote:
> There is the only failure path in efm32_i2c_probe(),
> where clk_disable_unprepare() is missed.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>

Applied to for-next, thanks!

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web