Commit 5b304046 authored by Jian Zhang's avatar Jian Zhang Committed by Mauro Carvalho Chehab

media: driver/nxp/imx-jpeg: fix a unexpected return value problem

In function mxc_jpeg_probe(), when devm_clk_get() fail, the return value
will be unexpected, and it should be the devm_clk_get's error code.

Fixes: 4c2e5156 ("media: imx-jpeg: Add pm-runtime support for imx-jpeg")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarJian Zhang <zhangjian210@huawei.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent a340c85c
......@@ -2205,12 +2205,14 @@ static int mxc_jpeg_probe(struct platform_device *pdev)
jpeg->clk_ipg = devm_clk_get(dev, "ipg");
if (IS_ERR(jpeg->clk_ipg)) {
dev_err(dev, "failed to get clock: ipg\n");
ret = PTR_ERR(jpeg->clk_ipg);
goto err_clk;
}
jpeg->clk_per = devm_clk_get(dev, "per");
if (IS_ERR(jpeg->clk_per)) {
dev_err(dev, "failed to get clock: per\n");
ret = PTR_ERR(jpeg->clk_per);
goto err_clk;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment