media: ngene: simplify the return expression of eeprom_write_ushort()
authorQinglang Miao <miaoqinglang@huawei.com>
Mon, 21 Sep 2020 13:10:37 +0000 (15:10 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 11 Mar 2021 10:59:45 +0000 (11:59 +0100)
Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/pci/ngene/ngene-cards.c

index 8bfb3d8..7dbc21e 100644 (file)
@@ -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)