mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-17 09:43:59 +08:00
hwmon: (lm90) Unregister hwmon device if interrupt setup fails
Commit109b1283fb
(hwmon: (lm90) Add support to handle IRQ) introduced interrupt support. Its error handling code fails to unregister the already registered hwmon device. Fixes:109b1283fb
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
parent
9538e10086
commit
3d489ac07e
@ -1610,12 +1610,14 @@ static int lm90_probe(struct i2c_client *client,
|
||||
"lm90", client);
|
||||
if (err < 0) {
|
||||
dev_err(dev, "cannot request IRQ %d\n", client->irq);
|
||||
goto exit_remove_files;
|
||||
goto exit_unregister;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
exit_unregister:
|
||||
hwmon_device_unregister(data->hwmon_dev);
|
||||
exit_remove_files:
|
||||
lm90_remove_files(client, data);
|
||||
exit_restore:
|
||||
|
Loading…
Reference in New Issue
Block a user