[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20201017142810.26967-2-alex.dewar90@gmail.com>
Date: Sat, 17 Oct 2020 15:28:02 +0100
From: Alex Dewar <alex.dewar90@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Alex Dewar <alex.dewar90@...il.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-media@...r.kernel.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] staging: media: atomisp: Remove unnecessary if statement
The bodies of the if and else sections are the same, so just remove the
check.
Signed-off-by: Alex Dewar <alex.dewar90@...il.com>
---
.../staging/media/atomisp/pci/atomisp_cmd.c | 27 +++++--------------
1 file changed, 6 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
index 592ea990d4ca..92ddce409d04 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
@@ -5407,27 +5407,12 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
return -EINVAL;
}
- if (asd->continuous_mode->val &&
- (configure_pp_input == atomisp_css_preview_configure_pp_input ||
- configure_pp_input == atomisp_css_video_configure_pp_input)) {
- /* for isp 2.2, configure pp input is available for continuous
- * mode */
- ret = configure_pp_input(asd, isp_sink_crop->width,
- isp_sink_crop->height);
- if (ret) {
- dev_err(isp->dev, "configure_pp_input %ux%u\n",
- isp_sink_crop->width,
- isp_sink_crop->height);
- return -EINVAL;
- }
- } else {
- ret = configure_pp_input(asd, isp_sink_crop->width,
- isp_sink_crop->height);
- if (ret) {
- dev_err(isp->dev, "configure_pp_input %ux%u\n",
- isp_sink_crop->width, isp_sink_crop->height);
- return -EINVAL;
- }
+ ret = configure_pp_input(asd, isp_sink_crop->width, isp_sink_crop->height);
+ if (ret) {
+ dev_err(isp->dev, "configure_pp_input %ux%u\n",
+ isp_sink_crop->width,
+ isp_sink_crop->height);
+ return -EINVAL;
}
if (asd->copy_mode)
ret = atomisp_css_copy_get_output_frame_info(asd, stream_index,
--
2.28.0
Powered by blists - more mailing lists