1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-11 17:10:13 +00:00

iio: dac: Drop unnecessary -ENOMEM messages

The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err()
messages from the probe().

Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
Link: https://patch.msgid.link/20250822-enomam_logs-v1-3-db87f2974552@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Dixit Parmar 2025-08-22 09:19:51 +05:30 committed by Jonathan Cameron
parent c7979dbdc7
commit eeca066c9d
4 changed files with 4 additions and 12 deletions

View File

@ -371,10 +371,8 @@ static int ad5380_probe(struct device *dev, struct regmap *regmap,
int ret;
indio_dev = devm_iio_device_alloc(dev, sizeof(*st));
if (indio_dev == NULL) {
dev_err(dev, "Failed to allocate iio device\n");
if (indio_dev == NULL)
return -ENOMEM;
}
st = iio_priv(indio_dev);

View File

@ -278,10 +278,8 @@ static int ad5764_probe(struct spi_device *spi)
int ret;
indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
if (indio_dev == NULL) {
dev_err(&spi->dev, "Failed to allocate iio device\n");
if (indio_dev == NULL)
return -ENOMEM;
}
st = iio_priv(indio_dev);
spi_set_drvdata(spi, indio_dev);

View File

@ -221,10 +221,8 @@ static int ds4424_probe(struct i2c_client *client)
int ret;
indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
if (!indio_dev) {
dev_err(&client->dev, "iio dev alloc failed.\n");
if (!indio_dev)
return -ENOMEM;
}
data = iio_priv(indio_dev);
i2c_set_clientdata(client, indio_dev);

View File

@ -242,10 +242,8 @@ static int ti_dac_probe(struct spi_device *spi)
int ret;
indio_dev = devm_iio_device_alloc(dev, sizeof(*ti_dac));
if (!indio_dev) {
dev_err(dev, "can not allocate iio device\n");
if (!indio_dev)
return -ENOMEM;
}
spi->mode = SPI_MODE_1;
spi->bits_per_word = 16;