summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_files.py
diff options
context:
space:
mode:
authorZeng Heng <zengheng4@huawei.com>2022-11-17 11:32:19 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2022-11-18 01:38:10 +0300
commit5b79480ce1978864ac3f06f2134dfa3b6691fe74 (patch)
treecfa54bb4b18f62e3600bef681954779d9c56bbd2 /scripts/lib/kdoc/kdoc_files.py
parent09b327c991d21f7b432ba7b88b2368a6970c3916 (diff)
downloadlinux-5b79480ce1978864ac3f06f2134dfa3b6691fe74.tar.xz
power: supply: fix residue sysfs file in error handle route of __power_supply_register()
If device_add() succeeds, we should call device_del() when want to get rid of it, so move it into proper jump symbol. Otherwise, when __power_supply_register() returns fail and goto wakeup_init_failed to exit, there is still residue device file in sysfs. When attempt to probe device again, sysfs would complain as below: sysfs: cannot create duplicate filename '/devices/platform/i2c/i2c-0/0-001c/power_supply/adp5061' Call Trace: dump_stack_lvl+0x68/0x85 sysfs_warn_dup.cold+0x1c/0x29 sysfs_create_dir_ns+0x1b1/0x1d0 kobject_add_internal+0x143/0x390 kobject_add+0x108/0x170 Fixes: 80c6463e2fa3 ("power_supply: Fix Oops from NULL pointer dereference from wakeup_source_activate") Signed-off-by: Zeng Heng <zengheng4@huawei.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions