diff options
author | Hardik Singh Rathore <hardiksingh.k@gmail.com> | 2018-12-12 22:17:46 +0530 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-12-16 14:05:56 +0000 |
commit | 1533e45748783ca971639b1b661509314a13ff8c (patch) | |
tree | 559a57c31d7343d5a46ebbfab4b2f99442b0b78f /drivers/staging/iio/addac/adt7316-spi.c | |
parent | 618ab57f95bd15bfa153a6901a19a8c10e816156 (diff) | |
download | linux-1533e45748783ca971639b1b661509314a13ff8c.tar.bz2 |
staging: iio: adt7316: drop unnecessary initialization of variables
Initialization is unnecessary when the variable is written before it is
read. There were some occasions in which the driver would initialize `ret'
during declaration without need.
Purely a cosmetic change with no functional impact.
Signed-off-by: Hardik Singh Rathore <hardiksingh.k@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/staging/iio/addac/adt7316-spi.c')
-rw-r--r-- | drivers/staging/iio/addac/adt7316-spi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/addac/adt7316-spi.c b/drivers/staging/iio/addac/adt7316-spi.c index e75827e326a6..8294b9c1e3c2 100644 --- a/drivers/staging/iio/addac/adt7316-spi.c +++ b/drivers/staging/iio/addac/adt7316-spi.c @@ -27,7 +27,7 @@ static int adt7316_spi_multi_read(void *client, u8 reg, u8 count, u8 *data) { struct spi_device *spi_dev = client; u8 cmd[2]; - int ret = 0; + int ret; if (count > ADT7316_REG_MAX_ADDR) count = ADT7316_REG_MAX_ADDR; @@ -56,7 +56,7 @@ static int adt7316_spi_multi_write(void *client, u8 reg, u8 count, u8 *data) { struct spi_device *spi_dev = client; u8 buf[ADT7316_REG_MAX_ADDR + 2]; - int i, ret = 0; + int i, ret; if (count > ADT7316_REG_MAX_ADDR) count = ADT7316_REG_MAX_ADDR; |