mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
mfd: mxs-lradc: Fix error handling in mxs_lradc_probe()
[ Upstream commit 362741a21a
]
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>
This commit is contained in:
parent
8268e93b2b
commit
aeb01451f9
1 changed files with 4 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue