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
parent
5c2bf13c9a
commit
9c6674035e
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue