Skip to content

Commit 25ddd7c

Browse files
diandersJiri Kosina
authored andcommitted
HID: i2c-hid: goodix: Use the devm variant of regulator_register_notifier()
In commit 18eeef4 ("HID: i2c-hid: goodix: Tie the reset line to true state of the regulator") I added a call to regulator_register_notifier() but no call to unregister. That's a bug. Let's use the devm variant to handle the unregistering. Fixes: 18eeef4 ("HID: i2c-hid: goodix: Tie the reset line to true state of the regulator") Signed-off-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1 parent 18eeef4 commit 25ddd7c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hid/i2c-hid/i2c-hid-of-goodix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ static int i2c_hid_of_goodix_probe(struct i2c_client *client,
132132
*/
133133
mutex_lock(&ihid_goodix->regulator_mutex);
134134
ihid_goodix->nb.notifier_call = ihid_goodix_vdd_notify;
135-
ret = regulator_register_notifier(ihid_goodix->vdd, &ihid_goodix->nb);
135+
ret = devm_regulator_register_notifier(ihid_goodix->vdd, &ihid_goodix->nb);
136136
if (ret) {
137137
mutex_unlock(&ihid_goodix->regulator_mutex);
138138
return dev_err_probe(&client->dev, ret,

0 commit comments

Comments
 (0)