summaryrefslogtreecommitdiff
path: root/Documentation/controllers/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorGui-Dong Han <hanguidong02@gmail.com>2026-03-23 16:58:46 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-04-02 16:15:23 +0200
commit7215e4552f31e53595eae56a834f7e286beecccc (patch)
treed59d383d01d2089215447eff5a599cbde920788a /Documentation/controllers/git@git.tavy.me:linux.git
parent4afc929c0f74c4f22b055a82b371d50586da58ca (diff)
soundwire: debugfs: initialize firmware_file to empty string
Passing NULL to debugfs_create_str() causes a NULL pointer dereference, and creating debugfs nodes with NULL string pointers is no longer permitted. Additionally, firmware_file is a global pointer. Previously, adding every new slave blindly overwrote it with NULL. Fix these issues by initializing firmware_file to an allocated empty string once in the subsystem init path (sdw_debugfs_init), and freeing it in the exit path. Existing driver code handles empty strings correctly. Fixes: fe46d2a4301d ("soundwire: debugfs: add interface to read/write commands") Reported-by: yangshiguang <yangshiguang@xiaomi.com> Closes: https://lore.kernel.org/lkml/17647e4c.d461.19b46144a4e.Coremail.yangshiguang1011@163.com/ Signed-off-by: Gui-Dong Han <hanguidong02@gmail.com> Link: https://patch.msgid.link/20260323085930.88894-4-hanguidong02@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/controllers/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions