]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: dac: Drop unnecessary -ENOMEM messages
authorDixit Parmar <dixitparmar19@gmail.com>
Fri, 22 Aug 2025 03:49:51 +0000 (09:19 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 25 Aug 2025 11:32:48 +0000 (12:32 +0100)
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>
drivers/iio/dac/ad5380.c
drivers/iio/dac/ad5764.c
drivers/iio/dac/ds4424.c
drivers/iio/dac/ti-dac7311.c

index 0ddce7b218e330fed8beed3bed555146067a4821..8b813cee7625a72b647b03483fceb1544e87dca4 100644 (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);
 
index 26c049d5b73a5cf9044a4e82b9908dd9c9b68465..fbbd7105a80c777e8d6f2067ec052b6bccbb3f46 100644 (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);
index a26a99753418db66d013f31bcad7072bcff60813..a8198ba4f98a625b93803b3c30605485a1e98866 100644 (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);
index 3d2ce61f0db653db9ea0f23a94ffd4ff5e3192a2..5c1c5213962ffed330aed40912d95afbb5297237 100644 (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;