mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
hwmon: (w83781d) Remove duplicate NULL check
Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Cc: Jean Delvare <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: [email protected] Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Jean Delvare <[email protected]> Acked-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
This commit is contained in:
parent
ab5ee24615
commit
0ab21d0edb
1 changed files with 4 additions and 8 deletions
|
|
@ -1246,10 +1246,8 @@ w83781d_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
|||
|
||||
exit_remove_files:
|
||||
w83781d_remove_files(dev);
|
||||
if (data->lm75[0])
|
||||
i2c_unregister_device(data->lm75[0]);
|
||||
if (data->lm75[1])
|
||||
i2c_unregister_device(data->lm75[1]);
|
||||
i2c_unregister_device(data->lm75[0]);
|
||||
i2c_unregister_device(data->lm75[1]);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
@ -1262,10 +1260,8 @@ w83781d_remove(struct i2c_client *client)
|
|||
hwmon_device_unregister(data->hwmon_dev);
|
||||
w83781d_remove_files(dev);
|
||||
|
||||
if (data->lm75[0])
|
||||
i2c_unregister_device(data->lm75[0]);
|
||||
if (data->lm75[1])
|
||||
i2c_unregister_device(data->lm75[1]);
|
||||
i2c_unregister_device(data->lm75[0]);
|
||||
i2c_unregister_device(data->lm75[1]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue