diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2017-10-14 01:06:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-20 10:10:33 +0100 |
commit | aeb01451f9e2d3e9b2ac2ad30426c68957c307ed (patch) | |
tree | 34c5acfbe12cda0f8f4a5b4a45e702c99cb2ee01 /drivers/mfd | |
parent | 8268e93b2b879912ae84952acef17e4c78f3b66d (diff) |
mfd: mxs-lradc: Fix error handling in mxs_lradc_probe()
[ 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@ispras.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/mxs-lradc.c | 6 |
1 files 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: |