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

Configure Feed

Select the types of activity you want to include in your feed.

iio: light: veml6070: use dev_err_probe in probe function

Drop the common 'dev_err() + return' combination in the probe function
and use 'return dev_err_probe()' instead.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20240929-veml6070-cleanup-v1-7-a9350341a646@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Javier Carrasco and committed by
Jonathan Cameron
fc04cc73 8a49c373

+3 -4
+3 -4
drivers/iio/light/veml6070.c
··· 168 168 return ret; 169 169 170 170 data->client2 = i2c_new_dummy_device(client->adapter, VEML6070_ADDR_DATA_LSB); 171 - if (IS_ERR(data->client2)) { 172 - dev_err(&client->dev, "i2c device for second chip address failed\n"); 173 - return PTR_ERR(data->client2); 174 - } 171 + if (IS_ERR(data->client2)) 172 + return dev_err_probe(&client->dev, PTR_ERR(data->client2), 173 + "i2c device for second chip address failed\n"); 175 174 176 175 data->config = VEML6070_IT_10 | VEML6070_COMMAND_RSRVD | 177 176 VEML6070_COMMAND_SD;