aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Raynal <[email protected]>2021-09-21 13:53:54 +0200
committerJonathan Cameron <[email protected]>2021-10-19 08:27:33 +0100
commit064652c0a402fc1324671b08bc0214957f784611 (patch)
tree5b007eaad00cb3e551a98c2af07521d9455c81ea
parent7127822d192969255d26902661c979b99214f629 (diff)
iio: adc: max1027: Drop extra warning message
Memory allocation errors automatically trigger the right logs, no need to have our own. Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Nuno Sá <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
-rw-r--r--drivers/iio/adc/max1027.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c
index 372f2ca96eae..9eaeb1784c3b 100644
--- a/drivers/iio/adc/max1027.c
+++ b/drivers/iio/adc/max1027.c
@@ -446,10 +446,8 @@ static int max1027_probe(struct spi_device *spi)
st->buffer = devm_kmalloc_array(&indio_dev->dev,
indio_dev->num_channels, 2,
GFP_KERNEL);
- if (!st->buffer) {
- dev_err(&indio_dev->dev, "Can't allocate buffer\n");
+ if (!st->buffer)
return -ENOMEM;
- }
if (spi->irq) {
ret = devm_iio_triggered_buffer_setup(&spi->dev, indio_dev,