media: amphion: free ctrl handler if error is set and return error
authorMing Qian <ming.qian@nxp.com>
Fri, 22 Apr 2022 01:36:21 +0000 (03:36 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 09:02:19 +0000 (11:02 +0200)
commit37ed01d5f27fe67e0a86b0fe8a053f054a7f3948
treeffc518808297a2b237196a7f8c362b8b9fc0c398
parentbe9fd51072a1c0e886281a060e79c669ebdf2049
media: amphion: free ctrl handler if error is set and return error

The typical behavior is to add all controls, then at the end check if
hdl->error was set, and if so, v4l2_ctrl_handler_free is called and
the error is returned.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/amphion/vdec.c
drivers/media/platform/amphion/venc.c