Skip to content

Commit

Permalink
staging: iio: cdc: ad7746: Remove unnecessary assignment in ad7746_pr…
Browse files Browse the repository at this point in the history
…obe()

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 <tangbin@cmss.chinamobile.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20210518095647.3008-1-tangbin@cmss.chinamobile.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  • Loading branch information
Tang Bin authored and Jonathan Cameron committed Jun 3, 2021
1 parent b892770 commit 842b172
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/iio/cdc/ad7746.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 842b172

Please sign in to comment.