Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3136943pxk; Mon, 21 Sep 2020 06:15:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyS8znnpL+HBUYJd7qXUTk1qxWzLuJQCoGZyjygLi6eehnYcMxBKjWfIgZ8wN/5T7G/WwD X-Received: by 2002:a17:906:3088:: with SMTP id 8mr39608915ejv.487.1600694140709; Mon, 21 Sep 2020 06:15:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600694140; cv=none; d=google.com; s=arc-20160816; b=K80N9OGONJGw0rJ+eySi1E+o0V8UwxUlGA6llL2lL807qQGmI2HznEiFJFJvZv8x45 n0tkqpUUKyAORz8hHRFNPZs6Zp9Ciqioh6hX5Gj0azWmqAmuvj+WDTJFmDWbLLHw6fzC iNI5xnfDNfTTaElvYWJeDJyuNIuOTDQIC/Zr+NAIy6HbyVWnvQeE5rF3/qMaTY5hzDoC WNiSTUliROHZNYjRyjBpQkDXY8JVmiXs6xiilc45uRuL2Hl8/hOfoRsO0aNERHPCkEcB 5fqt7J2Q6J/WfW2HBtfdWIF/KgiWtQ0+m3MaQCCU47FfpopQO4/eptNcuuiETx1kMzW6 /hLw== 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=1LptwFU84Cjh7eOiO95HHStfDy2Y2pxiNATpBh6F45w=; b=JDd53EpzE8DBVqgyCXHZTp0TX6SXEdcGe9VyReJ+tiK8pXjaff2PGTHCmMFIbKPGZd l7wUieqgbbGUYNR9bCrjyNYEO9hmVPLFlWuyOM1gn0xlorABGXi9bT3rmjKj2jV52OJu fPyfT/z5+8/im1Ga6DkghumFNQ9AhvZ7p1tArunpVtudMnKsc5Sm3sSQNDNxjLbdqczW y9+0JRiN0LciFT4fqHv45S58rQ/TLOv/YhC2WlzlxaQb6+uiKRxv933GAFCoWq3oJyNc R6yDE/YGhSg2an95q8OFwc0lI5fv2hkU6m51qG8zR6GzeDLaa+UIQHt5IASUWRARawE2 8psg== 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 u8si5778180edx.66.2020.09.21.06.15.16; Mon, 21 Sep 2020 06:15:40 -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 S1727381AbgIUNNJ (ORCPT + 99 others); Mon, 21 Sep 2020 09:13:09 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13803 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727317AbgIUNK0 (ORCPT ); Mon, 21 Sep 2020 09:10:26 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 9545376C8ACC50B6BD60; Mon, 21 Sep 2020 21:10:23 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 21:10:12 +0800 From: Qinglang Miao To: Mauro Carvalho Chehab CC: , , "Qinglang Miao" Subject: [PATCH -next] media: ngene: simplify the return expression of eeprom_write_ushort() Date: Mon, 21 Sep 2020 21:10:37 +0800 Message-ID: <20200921131037.92158-1-miaoqinglang@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Qinglang Miao --- drivers/media/pci/ngene/ngene-cards.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/media/pci/ngene/ngene-cards.c b/drivers/media/pci/ngene/ngene-cards.c index 8bfb3d8ea..7dbc21e1a 100644 --- a/drivers/media/pci/ngene/ngene-cards.c +++ b/drivers/media/pci/ngene/ngene-cards.c @@ -934,15 +934,11 @@ static int eeprom_read_ushort(struct i2c_adapter *adapter, u16 tag, u16 *data) static int eeprom_write_ushort(struct i2c_adapter *adapter, u16 tag, u16 data) { - int stat; u8 buf[2]; buf[0] = data >> 8; buf[1] = data & 0xff; - stat = WriteEEProm(adapter, tag, 2, buf); - if (stat) - return stat; - return 0; + return WriteEEProm(adapter, tag, 2, buf); } static s16 osc_deviation(void *priv, s16 deviation, int flag) -- 2.23.0