aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel/pmt/class.c
diff options
context:
space:
mode:
authorNathan Chancellor <[email protected]>2025-07-15 22:56:05 +0000
committerUlf Hansson <[email protected]>2025-07-16 10:01:09 +0000
commit21b34a3a204ed616373a12ec17dc127ebe51eab3 (patch)
tree7d6f87244ef59c2d75ed0640de02dd1b05e309df /drivers/platform/x86/intel/pmt/class.c
parentmmc: bcm2835: Fix dma_unmap_sg() nents value (diff)
downloadkernel-21b34a3a204ed616373a12ec17dc127ebe51eab3.tar.gz
kernel-21b34a3a204ed616373a12ec17dc127ebe51eab3.zip
memstick: core: Zero initialize id_reg in h_memstick_read_dev_id()
A new warning in clang [1] points out that id_reg is uninitialized then passed to memstick_init_req() as a const pointer: drivers/memstick/core/memstick.c:330:59: error: variable 'id_reg' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer] 330 | memstick_init_req(&card->current_mrq, MS_TPC_READ_REG, &id_reg, | ^~~~~~ Commit de182cc8e882 ("drivers/memstick/core/memstick.c: avoid -Wnonnull warning") intentionally passed this variable uninitialized to avoid an -Wnonnull warning from a NULL value that was previously there because id_reg is never read from the call to memstick_init_req() in h_memstick_read_dev_id(). Just zero initialize id_reg to avoid the warning, which is likely happening in the majority of builds using modern compilers that support '-ftrivial-auto-var-init=zero'. Cc: [email protected] Fixes: de182cc8e882 ("drivers/memstick/core/memstick.c: avoid -Wnonnull warning") Link: https://github.com/llvm/llvm-project/commit/00dacf8c22f065cb52efb14cd091d441f19b319e [1] Closes: https://github.com/ClangBuiltLinux/linux/issues/2105 Signed-off-by: Nathan Chancellor <[email protected]> Link: https://lore.kernel.org/r/20250715-memstick-fix-uninit-const-pointer-v1-1-f6753829c27a@kernel.org Signed-off-by: Ulf Hansson <[email protected]>
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.c')
0 files changed, 0 insertions, 0 deletions