mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
hwmon: (w83781d) convert to i2c_new_dummy_device
Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an ERRPTR which we use in error handling. Signed-off-by: Wolfram Sang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
This commit is contained in:
parent
25d4016464
commit
22e96ce318
1 changed files with 3 additions and 3 deletions
|
|
@ -894,12 +894,12 @@ w83781d_detect_subclients(struct i2c_client *new_client)
|
|||
}
|
||||
|
||||
for (i = 0; i < num_sc; i++) {
|
||||
data->lm75[i] = i2c_new_dummy(adapter, sc_addr[i]);
|
||||
if (!data->lm75[i]) {
|
||||
data->lm75[i] = i2c_new_dummy_device(adapter, sc_addr[i]);
|
||||
if (IS_ERR(data->lm75[i])) {
|
||||
dev_err(&new_client->dev,
|
||||
"Subclient %d registration at address 0x%x failed.\n",
|
||||
i, sc_addr[i]);
|
||||
err = -ENOMEM;
|
||||
err = PTR_ERR(data->lm75[i]);
|
||||
if (i == 1)
|
||||
goto ERROR_SC_3;
|
||||
goto ERROR_SC_2;
|
||||
|
|
|
|||
Loading…
Reference in a new issue