iio: proximity: 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-9-db87f2974552@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
pull/1354/merge
Dixit Parmar 2025-08-22 09:19:57 +05:30 committed by Jonathan Cameron
parent b5e04043b4
commit 1f6fcf7fb4
2 changed files with 2 additions and 6 deletions

View File

@ -280,10 +280,8 @@ static int ping_probe(struct platform_device *pdev)
struct iio_dev *indio_dev;
indio_dev = devm_iio_device_alloc(dev, sizeof(struct ping_data));
if (!indio_dev) {
dev_err(dev, "failed to allocate IIO device\n");
if (!indio_dev)
return -ENOMEM;
}
data = iio_priv(indio_dev);
data->dev = dev;

View File

@ -253,10 +253,8 @@ static int srf04_probe(struct platform_device *pdev)
int ret;
indio_dev = devm_iio_device_alloc(dev, sizeof(struct srf04_data));
if (!indio_dev) {
dev_err(dev, "failed to allocate IIO device\n");
if (!indio_dev)
return -ENOMEM;
}
data = iio_priv(indio_dev);
data->dev = dev;