summaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-10-24 13:53:00 +0200
committerJonathan Cameron <jic23@kernel.org>2013-10-24 15:47:49 +0200
commita9b685110036e27ccd9ed0d71e08bb66f3fed6fd (patch)
tree41814224541ddee43c21c7a5ebc3eaa7d8878e88 /drivers/iio/dac
parentiio: dac: max517: Remove redundant variable (diff)
downloadlinux-a9b685110036e27ccd9ed0d71e08bb66f3fed6fd.tar.xz
linux-a9b685110036e27ccd9ed0d71e08bb66f3fed6fd.zip
iio: dac: mcp4725: Remove redundant code
Remove an inconsequential print message and return directly thereby cleaning up some code. 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/mcp4725.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/iio/dac/mcp4725.c b/drivers/iio/dac/mcp4725.c
index d982752dd9c4..9f57ae84ab89 100644
--- a/drivers/iio/dac/mcp4725.c
+++ b/drivers/iio/dac/mcp4725.c
@@ -320,13 +320,7 @@ static int mcp4725_probe(struct i2c_client *client,
data->powerdown_mode = pd ? pd-1 : 2; /* 500kohm_to_gnd */
data->dac_value = (inbuf[1] << 4) | (inbuf[2] >> 4);
- err = iio_device_register(indio_dev);
- if (err)
- return err;
-
- dev_info(&client->dev, "MCP4725 DAC registered\n");
-
- return 0;
+ return iio_device_register(indio_dev);
}
static int mcp4725_remove(struct i2c_client *client)