diff mbox series

[01/11] media: cedrus: remove superfluous call

Message ID 20221024201515.34129-2-jernej.skrabec@gmail.com
State Superseded
Headers show
Series media: cedrus: Format handling improvements and 10-bit HEVC support | expand

Commit Message

Jernej Škrabec Oct. 24, 2022, 8:15 p.m. UTC
cedrus_try_fmt_vid_out() is called two times inside
cedrus_s_fmt_vid_out(), but nothing changes between calls which would
influence output format. Remove first call, which was added later.

Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
 drivers/staging/media/sunxi/cedrus/cedrus_video.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Paul Kocialkowski Oct. 25, 2022, 3:08 p.m. UTC | #1
Hi Jernej,

On Mon 24 Oct 22, 22:15, Jernej Skrabec wrote:
> cedrus_try_fmt_vid_out() is called two times inside
> cedrus_s_fmt_vid_out(), but nothing changes between calls which would
> influence output format. Remove first call, which was added later.

Thanks for the cleanup!

Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Cheers,

Paul

> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> ---
>  drivers/staging/media/sunxi/cedrus/cedrus_video.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_video.c b/drivers/staging/media/sunxi/cedrus/cedrus_video.c
> index 33726175d980..1c3c1d080d31 100644
> --- a/drivers/staging/media/sunxi/cedrus/cedrus_video.c
> +++ b/drivers/staging/media/sunxi/cedrus/cedrus_video.c
> @@ -309,10 +309,6 @@ static int cedrus_s_fmt_vid_out(struct file *file, void *priv,
>  	struct vb2_queue *peer_vq;
>  	int ret;
>  
> -	ret = cedrus_try_fmt_vid_out(file, priv, f);
> -	if (ret)
> -		return ret;
> -
>  	vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type);
>  	/*
>  	 * In order to support dynamic resolution change,
> -- 
> 2.38.1
>
diff mbox series

Patch

diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_video.c b/drivers/staging/media/sunxi/cedrus/cedrus_video.c
index 33726175d980..1c3c1d080d31 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus_video.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus_video.c
@@ -309,10 +309,6 @@  static int cedrus_s_fmt_vid_out(struct file *file, void *priv,
 	struct vb2_queue *peer_vq;
 	int ret;
 
-	ret = cedrus_try_fmt_vid_out(file, priv, f);
-	if (ret)
-		return ret;
-
 	vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type);
 	/*
 	 * In order to support dynamic resolution change,