media: aspeed: fix error return code in aspeed_video_setup_video()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: d2b4387f3b
("media: platform: Add Aspeed Video Engine driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
69c9e825e8
commit
d497fcdab0
|
@ -1551,12 +1551,12 @@ static int aspeed_video_setup_video(struct aspeed_video *video)
|
||||||
V4L2_JPEG_CHROMA_SUBSAMPLING_420, mask,
|
V4L2_JPEG_CHROMA_SUBSAMPLING_420, mask,
|
||||||
V4L2_JPEG_CHROMA_SUBSAMPLING_444);
|
V4L2_JPEG_CHROMA_SUBSAMPLING_444);
|
||||||
|
|
||||||
if (video->ctrl_handler.error) {
|
rc = video->ctrl_handler.error;
|
||||||
|
if (rc) {
|
||||||
v4l2_ctrl_handler_free(&video->ctrl_handler);
|
v4l2_ctrl_handler_free(&video->ctrl_handler);
|
||||||
v4l2_device_unregister(v4l2_dev);
|
v4l2_device_unregister(v4l2_dev);
|
||||||
|
|
||||||
dev_err(video->dev, "Failed to init controls: %d\n",
|
dev_err(video->dev, "Failed to init controls: %d\n", rc);
|
||||||
video->ctrl_handler.error);
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue