From: Martiros Shakhzadyan Date: Mon, 19 Apr 2021 19:26:00 +0000 (+0200) Subject: media: staging: media: atomisp: Replace if else clause with a ternary X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d4bc34d18201120b247506b4a6ed17af694dfcf7;p=linux.git media: staging: media: atomisp: Replace if else clause with a ternary Use the ternary operator for conditional variable assignment in create_host_video_pipeline(). Signed-off-by: Martiros Shakhzadyan Signed-off-by: Hans Verkuil 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 4d4f030e0fe03..346f57147d90a 100644 --- a/drivers/staging/media/atomisp/pci/sh_css.c +++ b/drivers/staging/media/atomisp/pci/sh_css.c @@ -3617,11 +3617,8 @@ static int create_host_video_pipeline(struct ia_css_pipe *pipe) struct ia_css_frame *tmp_out_frame = NULL; for (i = 0; i < num_yuv_scaler; i++) { - if (is_output_stage[i]) { - tmp_out_frame = out_frame; - } else { - tmp_out_frame = NULL; - } + tmp_out_frame = is_output_stage[i] ? out_frame : NULL; + err = add_yuv_scaler_stage(pipe, me, tmp_in_frame, tmp_out_frame, NULL, &yuv_scaler_binary[i],