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

View File

@ -224,10 +224,8 @@ static int am2315_probe(struct i2c_client *client)
struct am2315_data *data; struct am2315_data *data;
indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data)); indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
if (!indio_dev) { if (!indio_dev)
dev_err(&client->dev, "iio allocation failed!\n");
return -ENOMEM; return -ENOMEM;
}
data = iio_priv(indio_dev); data = iio_priv(indio_dev);
data->client = client; data->client = client;

View File

@ -294,10 +294,8 @@ static int dht11_probe(struct platform_device *pdev)
struct iio_dev *iio; struct iio_dev *iio;
iio = devm_iio_device_alloc(dev, sizeof(*dht11)); iio = devm_iio_device_alloc(dev, sizeof(*dht11));
if (!iio) { if (!iio)
dev_err(dev, "Failed to allocate IIO device\n");
return -ENOMEM; return -ENOMEM;
}
dht11 = iio_priv(iio); dht11 = iio_priv(iio);
dht11->dev = dev; dht11->dev = dev;