Commit f132271
Al Stone
power: supply: sbs-charger: Don't cancel work that is not initialized
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2071846
Tested: This is one of a series of patch sets to enable Arm SystemReady IR
support in the kernel for NXP i.MX8 platforms. This set updates the
power subsystem. This set has been tested via simple boot tests and
the CI loop.
commit de85193
Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Sun Feb 13 18:07:03 2022 +0100
power: supply: sbs-charger: Don't cancel work that is not initialized
This driver can use an interrupt or polling in order get the charger's
status.
When using polling, a delayed work is used.
However, the remove() function unconditionally call
cancel_delayed_work_sync(), even if the delayed work is not used and is not
initialized.
In order to fix it, use devm_delayed_work_autocancel() and remove the now
useless remove() function.
Fixes: feb583e ("power: supply: add sbs-charger driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit de85193)
Signed-off-by: Al Stone <ahs3@redhat.com>1 parent ff87f0c commit f132271
1 file changed
+7
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
212 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
213 | 219 | | |
214 | 220 | | |
215 | 221 | | |
| |||
220 | 226 | | |
221 | 227 | | |
222 | 228 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | 229 | | |
233 | 230 | | |
234 | 231 | | |
| |||
245 | 242 | | |
246 | 243 | | |
247 | 244 | | |
248 | | - | |
249 | 245 | | |
250 | 246 | | |
251 | 247 | | |
| |||
0 commit comments