mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
iio: temperature: mlx90635: Remove dev_err_probe() if error is -ENOMEM
The dev_err_probe() doesn't do anything when the error is '-ENOMEM'. Therefore, remove the useless call to dev_err_probe(), and just return the value instead. Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com> Acked-by: Crt Mori <cmo@melexis.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250821080723.525379-8-zhao.xichao@vivo.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
7216d7b9be
commit
1f53971032
|
|
@ -939,7 +939,7 @@ static int mlx90635_probe(struct i2c_client *client)
|
|||
|
||||
indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*mlx90635));
|
||||
if (!indio_dev)
|
||||
return dev_err_probe(&client->dev, -ENOMEM, "failed to allocate device\n");
|
||||
return -ENOMEM;
|
||||
|
||||
regmap = devm_regmap_init_i2c(client, &mlx90635_regmap);
|
||||
if (IS_ERR(regmap))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user