]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
firmware: tegra: bpmp: Return directly after a failed kzalloc() in get_filename()
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 25 Dec 2023 19:03:56 +0000 (20:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Apr 2024 11:07:31 +0000 (13:07 +0200)
commit5dc5f8c705c3bf7cebf982497042b516d7d8f621
tree2c8c747b637a0181b38a04ed4457d041043127a4
parent1b2b26595bb09febf14c5444c873ac4ec90a5a77
firmware: tegra: bpmp: Return directly after a failed kzalloc() in get_filename()

[ Upstream commit 1315848f1f8a0100cb6f8a7187bc320c5d98947f ]

The kfree() function was called in one case by
the get_filename() function during error handling
even if the passed variable contained a null pointer.
This issue was detected by using the Coccinelle software.

Thus return directly after a call of the function “kzalloc” failed
at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/tegra/bpmp-debugfs.c