Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2953538pxk; Mon, 21 Sep 2020 01:05:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySMRj40RzFqj+++CwzIC2clOH/BJSXnELmeY6c9DAM1hbiw8NahR3qzbsrgky/TvitHzAe X-Received: by 2002:aa7:d4d2:: with SMTP id t18mr49983701edr.55.1600675556903; Mon, 21 Sep 2020 01:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600675556; cv=none; d=google.com; s=arc-20160816; b=PDcoNIGHmZ5ZE2ixG78ocbRe1PiLId/VRmn8f0UkOcwUoNzUC5bC/02MAayeKmyeOQ mBq+V4yYFNfjfQIES3HmvA4rxASAwVC8j8xClHldx46y3czKFoL0G7X2TH8sKgcW3vDO jskLzZuvekDSa+gA/KtTxW/gP0iEo/YPUnnXCSf3loNvlDai6h6YFmhMOkjF/nKxHhiD wjtLT8Y3MzhWuqOIfFtGRUqv03D4ozeIfAljXf/DCryn2fahsDpPKQ9Aatg89niP4QpH CQEnuehcTL2vzrh90Wo83/+0Pfak+CGO3RImPcBVU/qP8/10l2YI2Jp2hOdMJqRJzF8A cDJA== 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=SDnVJFxSExozC8L8ENhDhnUT3uQSjCMUxgKKoLEQ4Wg=; b=AggydibdqvmDA7FybkpAOg4gTwJkbty02pwnE0ywpkr/nPlAXK77EMAI2H2uYVagY6 cLRTlOjVSb1v+3T4gEGTQzXoyGlsqzulECKQoP0BXaBHf/ZkZB94m/8K0t5P3NE3+5J+ t97Nzv6Zka5UJmjkM2vz0vBZR42scnJQSytiXE0sk6R9Gqj0oE/+NCijxEBS5C48kZwK Q0DioXpZDK8N7zO7xeEvL0n6Lr5eQIGRx9WHEZ6mPb0DRsdMuh0rqUZIbBTNHqLbrUGJ zDJmwys7pskPX50rZ1X4fC959Q1TgPB4s3xMJHh4X03KiXb0gAuTlpNi1m+ef8bBG/+2 NcQQ== 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 j18si7609560ejb.50.2020.09.21.01.05.34; Mon, 21 Sep 2020 01:05:56 -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 S1727042AbgIUIDX (ORCPT + 99 others); Mon, 21 Sep 2020 04:03:23 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13786 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726334AbgIUIC0 (ORCPT ); Mon, 21 Sep 2020 04:02:26 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id B541EF959A893D63AD73; Mon, 21 Sep 2020 16:02:24 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 16:02:14 +0800 From: Liu Shixin To: Antti Palosaari , Mauro Carvalho Chehab CC: , , Liu Shixin Subject: [PATCH -next] media: anysee: simplify the return expression of anysee_ci_* function Date: Mon, 21 Sep 2020 16:24:38 +0800 Message-ID: <20200921082438.2591513-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/usb/dvb-usb-v2/anysee.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/anysee.c b/drivers/media/usb/dvb-usb-v2/anysee.c index 89a1b204b90c..aa45b5d263f6 100644 --- a/drivers/media/usb/dvb-usb-v2/anysee.c +++ b/drivers/media/usb/dvb-usb-v2/anysee.c @@ -1171,14 +1171,9 @@ static int anysee_ci_write_attribute_mem(struct dvb_ca_en50221 *ci, int slot, int addr, u8 val) { struct dvb_usb_device *d = ci->data; - int ret; u8 buf[] = {CMD_CI, 0x03, 0x40 | addr >> 8, addr & 0xff, 0x00, 1, val}; - ret = anysee_ctrl_msg(d, buf, sizeof(buf), NULL, 0); - if (ret) - return ret; - - return 0; + return anysee_ctrl_msg(d, buf, sizeof(buf), NULL, 0); } static int anysee_ci_read_cam_control(struct dvb_ca_en50221 *ci, int slot, @@ -1200,14 +1195,9 @@ static int anysee_ci_write_cam_control(struct dvb_ca_en50221 *ci, int slot, u8 addr, u8 val) { struct dvb_usb_device *d = ci->data; - int ret; u8 buf[] = {CMD_CI, 0x05, 0x40, addr, 0x00, 1, val}; - ret = anysee_ctrl_msg(d, buf, sizeof(buf), NULL, 0); - if (ret) - return ret; - - return 0; + return anysee_ctrl_msg(d, buf, sizeof(buf), NULL, 0); } static int anysee_ci_slot_reset(struct dvb_ca_en50221 *ci, int slot) @@ -1252,13 +1242,8 @@ static int anysee_ci_slot_shutdown(struct dvb_ca_en50221 *ci, int slot) static int anysee_ci_slot_ts_enable(struct dvb_ca_en50221 *ci, int slot) { struct dvb_usb_device *d = ci->data; - int ret; - ret = anysee_wr_reg_mask(d, REG_IOD, (0 << 1), 0x02); - if (ret) - return ret; - - return 0; + return anysee_wr_reg_mask(d, REG_IOD, (0 << 1), 0x02); } static int anysee_ci_poll_slot_status(struct dvb_ca_en50221 *ci, int slot, -- 2.25.1