diff options
author | Benjamin Gaignard <benjamin.gaignard@collabora.com> | 2021-06-03 13:49:58 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-06-08 16:06:16 +0200 |
commit | 42cb2a8f27d284b6c73dfc23bed4d6991f3bc1a3 (patch) | |
tree | 37cf7e462b0cfda6f16446b6be73683bc863afea /drivers/staging/media/hantro/hantro_drv.c | |
parent | d395a78db9eabd12633b39e05c80e803543b6590 (diff) | |
download | linux-42cb2a8f27d284b6c73dfc23bed4d6991f3bc1a3.tar.bz2 |
media: hantro: change hantro_codec_ops run prototype to return errors
Change hantro_codec_ops run prototype from 'void' to 'int'.
This allows the driver to cancel the job if an error occurs while configuring
the hardware.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media/hantro/hantro_drv.c')
-rw-r--r-- | drivers/staging/media/hantro/hantro_drv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c index 4914987cfd9d..e255756dfd9e 100644 --- a/drivers/staging/media/hantro/hantro_drv.c +++ b/drivers/staging/media/hantro/hantro_drv.c @@ -170,7 +170,9 @@ static void device_run(void *priv) v4l2_m2m_buf_copy_metadata(src, dst, true); - ctx->codec_ops->run(ctx); + if (ctx->codec_ops->run(ctx)) + goto err_cancel_job; + return; err_cancel_job: |