media: atomisp: clean up for-loop, remove redundant assignment to variable i
authorColin Ian King <colin.i.king@gmail.com>
Tue, 28 Jun 2022 15:24:51 +0000 (16:24 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 8 Jul 2022 16:49:27 +0000 (17:49 +0100)
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 <colin.i.king@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/sh_css.c

index 8ddf29e..da96aaf 100644 (file)
@@ -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;