From: Tang Bin Date: Tue, 18 May 2021 09:56:47 +0000 (+0800) Subject: staging: iio: cdc: ad7746: Remove unnecessary assignment in ad7746_probe() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4cea89749c65004fb097323f215801d94ebd0587;p=users%2Fjedix%2Flinux-maple.git staging: iio: cdc: ad7746: Remove unnecessary assignment in ad7746_probe() In the function ad7746_probe(), the initialized value of 'ret' is unused, because it will be assigned by the function i2c_smbus_write_byte_data(), thus remove it. Signed-off-by: Tang Bin Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20210518095647.3008-1-tangbin@cmss.chinamobile.com Signed-off-by: Jonathan Cameron --- diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c index dfd71e99e872e..be4ef454dfeb4 100644 --- a/drivers/staging/iio/cdc/ad7746.c +++ b/drivers/staging/iio/cdc/ad7746.c @@ -680,7 +680,7 @@ static int ad7746_probe(struct i2c_client *client, struct ad7746_chip_info *chip; struct iio_dev *indio_dev; unsigned char regval = 0; - int ret = 0; + int ret; indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*chip)); if (!indio_dev)