Skip to content

Commit a9b6851

Browse files
Sachin Kamatjic23
authored andcommitted
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>
1 parent 345d4f9 commit a9b6851

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

‎drivers/iio/dac/mcp4725.c‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,7 @@ static int mcp4725_probe(struct i2c_client *client,
320320
data->powerdown_mode = pd ? pd-1 : 2; /* 500kohm_to_gnd */
321321
data->dac_value = (inbuf[1] << 4) | (inbuf[2] >> 4);
322322

323-
err = iio_device_register(indio_dev);
324-
if (err)
325-
return err;
326-
327-
dev_info(&client->dev, "MCP4725 DAC registered\n");
328-
329-
return 0;
323+
return iio_device_register(indio_dev);
330324
}
331325

332326
static int mcp4725_remove(struct i2c_client *client)

0 commit comments

Comments
 (0)