From: Sachin Kamat Date: Thu, 24 Oct 2013 11:53:00 +0000 (+0100) Subject: iio: dac: max517: Remove redundant variable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=345d4f92e72964e2d2f482c635bc949b04f861ed;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iio: dac: max517: Remove redundant variable Remove an inconsequential print message and return directly thereby eliminating an intermediate variable. Signed-off-by: Sachin Kamat Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/dac/max517.c b/drivers/iio/dac/max517.c index d26be14fff64..6e1903537950 100644 --- a/drivers/iio/dac/max517.c +++ b/drivers/iio/dac/max517.c @@ -160,7 +160,6 @@ static int max517_probe(struct i2c_client *client, struct max517_data *data; struct iio_dev *indio_dev; struct max517_platform_data *platform_data = client->dev.platform_data; - int err; indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data)); if (!indio_dev) @@ -192,13 +191,7 @@ static int max517_probe(struct i2c_client *client, data->vref_mv[1] = platform_data->vref_mv[1]; } - err = iio_device_register(indio_dev); - if (err) - return err; - - dev_info(&client->dev, "DAC registered\n"); - - return 0; + return iio_device_register(indio_dev); } static int max517_remove(struct i2c_client *client)