]> git.baikalelectronics.ru Git - kernel.git/commit
Input: cypress-sf - register a callback to disable the regulators
authorZheyu Ma <zheyuma97@gmail.com>
Sat, 9 Apr 2022 02:30:49 +0000 (19:30 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 9 Apr 2022 02:34:46 +0000 (19:34 -0700)
commit177a4a92f6a9823e39facbf92f7582dff160ff80
treee9d2942d5d61e2273fe70c9db92c1cf4ea68fec9
parentaa3c5c6b7c5d5cfc7ffd643baec713314ca6d105
Input: cypress-sf - register a callback to disable the regulators

When the driver fails to probe, we will get the following splat:

[   19.311970] ------------[ cut here ]------------
[   19.312566] WARNING: CPU: 3 PID: 375 at drivers/regulator/core.c:2257 _regulator_put+0x3ec/0x4e0
[   19.317591] RIP: 0010:_regulator_put+0x3ec/0x4e0
[   19.328831] Call Trace:
[   19.329112]  <TASK>
[   19.329369]  regulator_bulk_free+0x82/0xe0
[   19.329860]  devres_release_group+0x319/0x3d0
[   19.330357]  i2c_device_probe+0x766/0x940

Fix this by adding a callback that will deal with the disabling when the
driver fails to probe.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Link: https://lore.kernel.org/r/20220409022629.3493557-1-zheyuma97@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/cypress-sf.c