From: Colin Ian King Date: Tue, 28 Jun 2022 15:24:51 +0000 (+0100) Subject: media: atomisp: clean up for-loop, remove redundant assignment to variable i X-Git-Tag: v6.0-rc1~139^2~207 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=71074d3783230ad99cb351a5cba69ce15febeca1;p=thirdparty%2Fkernel%2Flinux.git media: atomisp: clean up for-loop, remove redundant assignment to variable i There is a for-loop that initializes variable i but does not use it; the assignment is redundant and can be removed. The proceeding assignment to pointer fw can also be moved into the for-loop to clean up the code. Link: https://lore.kernel.org/linux-media/20220628152451.184416-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c index 8ddf29e88804a..da96aaffebc19 100644 --- a/drivers/staging/media/atomisp/pci/sh_css.c +++ b/drivers/staging/media/atomisp/pci/sh_css.c @@ -3507,8 +3507,7 @@ create_host_acc_pipeline(struct ia_css_pipe *pipe) if (pipe->config.acc_extension) pipe->pipeline.pipe_qos_config = 0; - fw = pipe->vf_stage; - for (i = 0; fw; fw = fw->next) { + for (fw = pipe->vf_stage; fw; fw = fw->next) { err = sh_css_pipeline_add_acc_stage(&pipe->pipeline, fw); if (err) goto ERR;