mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
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>
This commit is contained in:
committed by
Jonathan Cameron
parent
b5e04043b4
commit
1f6fcf7fb4
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user