aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2021-12-13 15:04:28 +0100
committerArnd Bergmann <arnd@arndb.de>2021-12-13 15:04:34 +0100
commit7ad1a90a6a6e41e698ae0712606507a416796960 (patch)
tree5007889a3e5016990e5fee7a26a23e7987bf3ca6 /drivers/firmware
parentMerge tag 'asahi-soc-fixes-5.16' of https://github.com/AsahiLinux/linux into arm/fixes (diff)
parentfirmware: tegra: Fix error application of sizeof() to pointer (diff)
downloadlinux-dev-7ad1a90a6a6e41e698ae0712606507a416796960.tar.xz
linux-dev-7ad1a90a6a6e41e698ae0712606507a416796960.zip
Merge tag 'tegra-for-5.16-firmware-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/fixes
firmware: Fixes for v5.16-rc5 This contains a single fix for an incorrect usage of sizeof(). * tag 'tegra-for-5.16-firmware-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: Fix error application of sizeof() to pointer Link: https://lore.kernel.org/r/20211207162115.450554-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/tegra/bpmp-debugfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/firmware/tegra/bpmp-debugfs.c b/drivers/firmware/tegra/bpmp-debugfs.c
index 6d66fe03fb6a..fd89899aeeed 100644
--- a/drivers/firmware/tegra/bpmp-debugfs.c
+++ b/drivers/firmware/tegra/bpmp-debugfs.c
@@ -77,13 +77,14 @@ static const char *get_filename(struct tegra_bpmp *bpmp,
const char *root_path, *filename = NULL;
char *root_path_buf;
size_t root_len;
+ size_t root_path_buf_len = 512;
- root_path_buf = kzalloc(512, GFP_KERNEL);
+ root_path_buf = kzalloc(root_path_buf_len, GFP_KERNEL);
if (!root_path_buf)
goto out;
root_path = dentry_path(bpmp->debugfs_mirror, root_path_buf,
- sizeof(root_path_buf));
+ root_path_buf_len);
if (IS_ERR(root_path))
goto out;