aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-10-24 07:53:00 -0400
committerJonathan Cameron <jic23@kernel.org>2013-10-24 09:47:15 -0400
commit345d4f92e72964e2d2f482c635bc949b04f861ed (patch)
tree2e1a11ce2b7108eb4d0a950e069521ca6eda5db8 /drivers/iio/dac
parente2f5543a73eaee370a0e0ed280aa71d3693ded2e (diff)
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>
Diffstat (limited to 'drivers/iio/dac')
-rw-r--r--drivers/iio/dac/max517.c9
1 files changed, 1 insertions, 8 deletions
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,
160 struct max517_data *data; 160 struct max517_data *data;
161 struct iio_dev *indio_dev; 161 struct iio_dev *indio_dev;
162 struct max517_platform_data *platform_data = client->dev.platform_data; 162 struct max517_platform_data *platform_data = client->dev.platform_data;
163 int err;
164 163
165 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data)); 164 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
166 if (!indio_dev) 165 if (!indio_dev)
@@ -192,13 +191,7 @@ static int max517_probe(struct i2c_client *client,
192 data->vref_mv[1] = platform_data->vref_mv[1]; 191 data->vref_mv[1] = platform_data->vref_mv[1];
193 } 192 }
194 193
195 err = iio_device_register(indio_dev); 194 return iio_device_register(indio_dev);
196 if (err)
197 return err;
198
199 dev_info(&client->dev, "DAC registered\n");
200
201 return 0;
202} 195}
203 196
204static int max517_remove(struct i2c_client *client) 197static int max517_remove(struct i2c_client *client)