aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiu Shixin <liushixin2@huawei.com>2020-09-21 10:24:39 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-11-16 10:31:15 +0100
commit652ce6769349e669e1514093a83dd913cc9b5039 (patch)
tree32d827e623f179a060e8738fd0bbf50b99c58c64
parentmedia: mtk-vcodec: remove allocated dma_parms (diff)
downloadlinux-dev-652ce6769349e669e1514093a83dd913cc9b5039.tar.xz
linux-dev-652ce6769349e669e1514093a83dd913cc9b5039.zip
media: media/pci: simplify the return expression of verify_window_lock
Simplify the return expression. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/media/pci/bt8xx/bttv-driver.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
index ef2ead36b70e..956a12e311c0 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -2058,7 +2058,6 @@ verify_window_lock(struct bttv_fh *fh, struct v4l2_window *win,
{
enum v4l2_field field;
unsigned int width_mask;
- int rc;
if (win->w.width < 48)
win->w.width = 48;
@@ -2111,13 +2110,10 @@ verify_window_lock(struct bttv_fh *fh, struct v4l2_window *win,
win->w.width -= win->w.left & ~width_mask;
win->w.left = (win->w.left - width_mask - 1) & width_mask;
- rc = limit_scaled_size_lock(fh, &win->w.width, &win->w.height,
- field, width_mask,
- /* width_bias: round down */ 0,
- adjust_size, adjust_crop);
- if (0 != rc)
- return rc;
- return 0;
+ return limit_scaled_size_lock(fh, &win->w.width, &win->w.height,
+ field, width_mask,
+ /* width_bias: round down */ 0,
+ adjust_size, adjust_crop);
}
static int setup_window_lock(struct bttv_fh *fh, struct bttv *btv,