[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200921131037.92158-1-miaoqinglang@huawei.com>
Date: Mon, 21 Sep 2020 21:10:37 +0800
From: Qinglang Miao <miaoqinglang@...wei.com>
To: Mauro Carvalho Chehab <mchehab@...nel.org>
CC: <linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
"Qinglang Miao" <miaoqinglang@...wei.com>
Subject: [PATCH -next] media: ngene: simplify the return expression of eeprom_write_ushort()
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@...wei.com>
---
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
Powered by blists - more mailing lists