Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dixit Parmar and committed by
Jonathan Cameron
fba366e6 fc3a8049

+2 -6
+1 -3
drivers/iio/humidity/am2315.c
··· 224 224 struct am2315_data *data; 225 225 226 226 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data)); 227 - if (!indio_dev) { 228 - dev_err(&client->dev, "iio allocation failed!\n"); 227 + if (!indio_dev) 229 228 return -ENOMEM; 230 - } 231 229 232 230 data = iio_priv(indio_dev); 233 231 data->client = client;
+1 -3
drivers/iio/humidity/dht11.c
··· 294 294 struct iio_dev *iio; 295 295 296 296 iio = devm_iio_device_alloc(dev, sizeof(*dht11)); 297 - if (!iio) { 298 - dev_err(dev, "Failed to allocate IIO device\n"); 297 + if (!iio) 299 298 return -ENOMEM; 300 - } 301 299 302 300 dht11 = iio_priv(iio); 303 301 dht11->dev = dev;