linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: atomisp: remove redundant re-checking of err
@ 2024-10-12 14:14 Colin Ian King
  2024-10-14 11:34 ` Andy Shevchenko
  2024-11-04 12:01 ` Hans de Goede
  0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2024-10-12 14:14 UTC (permalink / raw)
  To: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
	Andy Shevchenko, Greg Kroah-Hartman, linux-media, linux-kernel
  Cc: kernel-janitors, linux-staging

The check to see if err is non-zero is always false because err has
been previously checked on whenever err has been assigned in previous
code paths. The check is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/staging/media/atomisp/pci/sh_css.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index ca97ea082cf4..7cee4dc35427 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -6308,9 +6308,6 @@ load_yuvpp_binaries(struct ia_css_pipe *pipe)
 		}
 	}
 
-	if (err)
-		goto ERR;
-
 ERR:
 	if (need_scaler)
 		ia_css_pipe_destroy_cas_scaler_desc(&cas_scaler_descr);
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: atomisp: remove redundant re-checking of err
  2024-10-12 14:14 [PATCH] media: atomisp: remove redundant re-checking of err Colin Ian King
@ 2024-10-14 11:34 ` Andy Shevchenko
  2024-11-04 12:01 ` Hans de Goede
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2024-10-14 11:34 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
	Greg Kroah-Hartman, linux-media, linux-kernel, kernel-janitors,
	linux-staging

On Sat, Oct 12, 2024 at 03:14:03PM +0100, Colin Ian King wrote:
> The check to see if err is non-zero is always false because err has
> been previously checked on whenever err has been assigned in previous
> code paths. The check is redundant and can be removed.

Reviewed-by: Andy Shevchenko <andy@kernel.org>

All patches that end up in 100% minus lines statistics for this driver are so good!

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: atomisp: remove redundant re-checking of err
  2024-10-12 14:14 [PATCH] media: atomisp: remove redundant re-checking of err Colin Ian King
  2024-10-14 11:34 ` Andy Shevchenko
@ 2024-11-04 12:01 ` Hans de Goede
  1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2024-11-04 12:01 UTC (permalink / raw)
  To: Colin Ian King, Mauro Carvalho Chehab, Sakari Ailus,
	Andy Shevchenko, Greg Kroah-Hartman, linux-media, linux-kernel
  Cc: kernel-janitors, linux-staging

Hi,

On 12-Oct-24 4:14 PM, Colin Ian King wrote:
> The check to see if err is non-zero is always false because err has
> been previously checked on whenever err has been assigned in previous
> code paths. The check is redundant and can be removed.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Thank you for your patch(es).

I have merged this/these in my media-atomisp branch:
https://git.kernel.org/pub/scm/linux/kernel/git/hansg/linux.git/log/?h=media-atomisp

And this/these will be included in my next pull-request to
Mauro (to media subsystem maintainer)

Regards,

Hans



> ---
>  drivers/staging/media/atomisp/pci/sh_css.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
> index ca97ea082cf4..7cee4dc35427 100644
> --- a/drivers/staging/media/atomisp/pci/sh_css.c
> +++ b/drivers/staging/media/atomisp/pci/sh_css.c
> @@ -6308,9 +6308,6 @@ load_yuvpp_binaries(struct ia_css_pipe *pipe)
>  		}
>  	}
>  
> -	if (err)
> -		goto ERR;
> -
>  ERR:
>  	if (need_scaler)
>  		ia_css_pipe_destroy_cas_scaler_desc(&cas_scaler_descr);


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-11-04 12:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-12 14:14 [PATCH] media: atomisp: remove redundant re-checking of err Colin Ian King
2024-10-14 11:34 ` Andy Shevchenko
2024-11-04 12:01 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).