diff options
author | Martiros Shakhzadyan <vrzh@vrzh.net> | 2021-04-19 21:26:00 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-05-19 09:51:38 +0200 |
commit | d4bc34d18201120b247506b4a6ed17af694dfcf7 (patch) | |
tree | 98111a05f08baded7ecee703b976e6258cbbcf84 /drivers/staging/media | |
parent | 9d634547323e7cb7dd11c68075e8128ce68544ae (diff) | |
download | linux-d4bc34d18201120b247506b4a6ed17af694dfcf7.tar.gz |
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 <vrzh@vrzh.net>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/atomisp/pci/sh_css.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c index 4d4f030e0fe0..346f57147d90 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], |