]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerThierry Reding <treding@nvidia.com>
Wed, 21 Feb 2024 16:10:32 +0000 (17:10 +0100)
commit1315848f1f8a0100cb6f8a7187bc320c5d98947f
tree8abac992d4a898f35636112566784eed403ee826
parent6613476e225e090cc9aad49be7fa504e290dd33d
firmware: tegra: bpmp: Return directly after a failed kzalloc() in get_filename()

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>
drivers/firmware/tegra/bpmp-debugfs.c