Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2953555pxk; Mon, 21 Sep 2020 01:05:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy35f2QGG+sMrmCY4xulHPAARjnnF4FT8anywp+KyL9rr2Fz5AFhuweoJtRyaRBVW4pOVyp X-Received: by 2002:a17:906:9491:: with SMTP id t17mr50253999ejx.253.1600675558859; Mon, 21 Sep 2020 01:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600675558; cv=none; d=google.com; s=arc-20160816; b=AFwU8Tz5ZWML1K37M7mvEuoIBlVVHyWwUIAngiSud3v/L+LsL4mEpasfKgYqk6btbe SGq4mMTSI5NzRNSWFp7exnJRvMM+VRD4+Kba/BS2iKOwKazFTu0DfTz0/Pc0nTpU2Z4r rr/PJRLQJ27UzZCE7b3oKTZKmAerKlwhdC041cK/tqQxCu2+1J2ewxY0sjeNhWFFdGjj 5aPyjR/Yg1JIzOQ4pvjZm5CCtUR2qnBNUc22SZ+BIxuyy+FhRvjP1EfZ0t/uNLOgPzIv 918tihl4Ofu/Tsl2YJaQQYLvCMPqpmcprgysywYmLsR56imRBkRnSHXLRTIUcbj97KUd mcyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Hj23xPIrERvaoBxII3d7FqqN8/WFq3jo2XhPfllzGBY=; b=MuKfQbNrGgDOzs8rMGfsZAys5uRvR1O/gj102h1KnazXpkkudiTpKlgNizsRAT8keW YzlHZaOf1VpbJuuQ5wP1d7+YY2WxpEbmh/3wgKRqIpD3qRCtqssaMlVtIU8OmV4KDFiH bO8zxJxUiT7xGweszynK595pzrFUFP9BQUYzTcw7Flnp27cOqrimrP4j43mJ02LerizA JCGH8h7+UBmIzWgexHVQpFtTHOZ7/SxvKv9JGOfgVSRW4edDonbqyVsajjjUVI//NuAJ X0ZJWJHcwrUAW+wnXsrFhNO0InoqSpLjhCTYOfS+xnfaMfZXfTgE2iWmkFeTjskBI+a+ cK1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j10si7563778edy.0.2020.09.21.01.05.35; Mon, 21 Sep 2020 01:05:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726719AbgIUID1 (ORCPT + 99 others); Mon, 21 Sep 2020 04:03:27 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:13741 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726551AbgIUICZ (ORCPT ); Mon, 21 Sep 2020 04:02:25 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 558CE626DBA23AF9D5D4; Mon, 21 Sep 2020 16:02:23 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 16:02:15 +0800 From: Liu Shixin To: Mauro Carvalho Chehab CC: , , Liu Shixin Subject: [PATCH -next] media: media/pci: simplify the return expression of verify_window_lock Date: Mon, 21 Sep 2020 16:24:39 +0800 Message-ID: <20200921082439.2591565-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Liu Shixin --- drivers/media/pci/bt8xx/bttv-driver.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index 8c61d292dec1..4f7eaec20dc3 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, -- 2.25.1