iio: dac: max517: Remove redundant variable
Remove an inconsequential print message and return directly thereby eliminating an intermediate variable. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
e2f5543a73
commit
345d4f92e7
1 changed files with 1 additions and 8 deletions
|
@ -160,7 +160,6 @@ static int max517_probe(struct i2c_client *client,
|
||||||
struct max517_data *data;
|
struct max517_data *data;
|
||||||
struct iio_dev *indio_dev;
|
struct iio_dev *indio_dev;
|
||||||
struct max517_platform_data *platform_data = client->dev.platform_data;
|
struct max517_platform_data *platform_data = client->dev.platform_data;
|
||||||
int err;
|
|
||||||
|
|
||||||
indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
|
indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
|
||||||
if (!indio_dev)
|
if (!indio_dev)
|
||||||
|
@ -192,13 +191,7 @@ static int max517_probe(struct i2c_client *client,
|
||||||
data->vref_mv[1] = platform_data->vref_mv[1];
|
data->vref_mv[1] = platform_data->vref_mv[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
err = iio_device_register(indio_dev);
|
return iio_device_register(indio_dev);
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
|
|
||||||
dev_info(&client->dev, "DAC registered\n");
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int max517_remove(struct i2c_client *client)
|
static int max517_remove(struct i2c_client *client)
|
||||||
|
|
Loading…
Add table
Reference in a new issue