[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171207154513.4154-89-alexander.levin@verizon.com>
Date: Thu, 7 Dec 2017 15:45:52 +0000
From: alexander.levin@...izon.com
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Cc: Alexey Khoroshilov <khoroshilov@...ras.ru>,
Lee Jones <lee.jones@...aro.org>, alexander.levin@...izon.com
Subject: [PATCH AUTOSEL for 4.14 089/135] mfd: mxs-lradc: Fix error handling
in mxs_lradc_probe()
From: Alexey Khoroshilov <khoroshilov@...ras.ru>
[ Upstream commit 362741a21a5c4b9ee31e75ce28d63c6d238a745c ]
There is the only path, where mxs_lradc_probe() leaves clk undisabled,
since it does return instead of goto err_clk.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
Signed-off-by: Sasha Levin <alexander.levin@...izon.com>
---
drivers/mfd/mxs-lradc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/mxs-lradc.c b/drivers/mfd/mxs-lradc.c
index 630bd19b2c0a..98e732a7ae96 100644
--- a/drivers/mfd/mxs-lradc.c
+++ b/drivers/mfd/mxs-lradc.c
@@ -196,8 +196,10 @@ static int mxs_lradc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, lradc);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -ENOMEM;
+ if (!res) {
+ ret = -ENOMEM;
+ goto err_clk;
+ }
switch (lradc->soc) {
case IMX23_LRADC:
--
2.11.0
Powered by blists - more mailing lists