Skip to contentSkip to conversation

media: atomisp: remove redundant re-checking of err

PATCH In review Colin Ian King 3 participants 3 messages Oct 12, 2024 – Nov 4, 2024

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: atomisp: remove redundant re-checking of err

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.

---
 drivers/staging/media/atomisp/pci/sh_css.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/staging/media/atomisp/pci/sh_css.c +0 -3
index ca97ea082cf4..7cee4dc35427 100644
@@ -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);
Signature · 1 line
2.39.5
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Colin Ian King

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.

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

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
In reply to Colin Ian King

Hi,

Quoted 5 lines · Colin Ian King

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.

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

Quoted 18 lines
---
 drivers/staging/media/atomisp/pci/sh_css.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/staging/media/atomisp/pci/sh_css.c +0 -3
index ca97ea082cf4..7cee4dc35427 100644
@@ -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);