iio: accel: 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-1-db87f2974552@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
pull/1354/merge
Dixit Parmar 2025-08-22 09:19:49 +05:30 committed by Jonathan Cameron
parent 5c2bf13c9a
commit 9c6674035e
8 changed files with 8 additions and 24 deletions

View File

@ -255,10 +255,8 @@ static int bma220_probe(struct spi_device *spi)
struct bma220_data *data;
indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*data));
if (!indio_dev) {
dev_err(&spi->dev, "iio allocation failed!\n");
if (!indio_dev)
return -ENOMEM;
}
data = iio_priv(indio_dev);
data->spi_device = spi;

View File

@ -137,10 +137,8 @@ static int dmard06_probe(struct i2c_client *client)
}
indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*dmard06));
if (!indio_dev) {
dev_err(&client->dev, "Failed to allocate iio device\n");
if (!indio_dev)
return -ENOMEM;
}
dmard06 = iio_priv(indio_dev);
dmard06->client = client;

View File

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

View File

@ -191,10 +191,8 @@ static int dmard10_probe(struct i2c_client *client)
return (ret < 0) ? ret : -ENODEV;
indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
if (!indio_dev) {
dev_err(&client->dev, "iio allocation failed!\n");
if (!indio_dev)
return -ENOMEM;
}
data = iio_priv(indio_dev);
data->client = client;

View File

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

View File

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

View File

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

View File

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