diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2021-03-23 12:28:55 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-04-06 10:30:25 +0200 |
commit | fb3b597abdcec889876669e5dea2a80ea0ddbdd0 (patch) | |
tree | 1f323ef7eb0f60f48679c9e23273be201b838087 /drivers/media/platform/imx-jpeg | |
parent | media: rkisp1: uapi: document which flags/structs relate to statistics config (diff) | |
download | linux-fb3b597abdcec889876669e5dea2a80ea0ddbdd0.tar.xz linux-fb3b597abdcec889876669e5dea2a80ea0ddbdd0.zip |
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: 2db16c6ed72c ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/imx-jpeg')
-rw-r--r-- | drivers/media/platform/imx-jpeg/mxc-jpeg.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/imx-jpeg/mxc-jpeg.c index adb1715c75d7..54c93ae6aae0 100644 --- a/drivers/media/platform/imx-jpeg/mxc-jpeg.c +++ b/drivers/media/platform/imx-jpeg/mxc-jpeg.c @@ -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) |