summaryrefslogtreecommitdiff
path: root/drivers/firmware
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2021-12-13 17:04:28 +0300
committerArnd Bergmann <arnd@arndb.de>2021-12-13 17:04:34 +0300
commit7ad1a90a6a6e41e698ae0712606507a416796960 (patch)
tree5007889a3e5016990e5fee7a26a23e7987bf3ca6 /drivers/firmware
parentf6bdc6106727b4d7f1dde51ba664386ce654477e (diff)
parent711e26c00e4c7b7cef0420c76a61e6d818e12687 (diff)
downloadlinux-7ad1a90a6a6e41e698ae0712606507a416796960.tar.xz
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;