Merge tag 'tegra-for-5.16-firmware-fixes' of git://git.kernel.org/pub/scm/linux/kerne...
authorArnd Bergmann <arnd@arndb.de>
Mon, 13 Dec 2021 14:04:28 +0000 (15:04 +0100)
committerArnd Bergmann <arnd@arndb.de>
Mon, 13 Dec 2021 14:04:34 +0000 (15:04 +0100)
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>
drivers/firmware/tegra/bpmp-debugfs.c

index 6d66fe0..fd89899 100644 (file)
@@ -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;