Commit fb3b597a authored by Wei Yongjun's avatar Wei Yongjun Committed by Mauro Carvalho Chehab

media: imx-jpeg: Fix error return code in mxc_jpeg_probe()

Fix to return negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 2db16c6e ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent b98fc6b6
......@@ -2022,12 +2022,14 @@ static int mxc_jpeg_probe(struct platform_device *pdev)
jpeg->m2m_dev = v4l2_m2m_init(&mxc_jpeg_m2m_ops);
if (IS_ERR(jpeg->m2m_dev)) {
dev_err(dev, "failed to register v4l2 device\n");
ret = PTR_ERR(jpeg->m2m_dev);
goto err_m2m;
}
jpeg->dec_vdev = video_device_alloc();
if (!jpeg->dec_vdev) {
dev_err(dev, "failed to register v4l2 device\n");
ret = -ENOMEM;
goto err_vdev_alloc;
}
if (mode == MXC_JPEG_ENCODE)
......
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