mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 15:41:39 +00:00
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: 4c2e5156d9
("media: imx-jpeg: Add pm-runtime support for imx-jpeg")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jian Zhang <zhangjian210@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
a340c85c4e
commit
5b304046a8
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user