aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/generate_rust_target.rs
diff options
context:
space:
mode:
authorNathan Chancellor <[email protected]>2025-01-11 19:08:38 +0000
committerMark Brown <[email protected]>2025-01-14 15:07:11 +0000
commite896c04890aeff2292364c19632fc15d890d436c (patch)
treef322e2d47e29c2e1e8dadfe43dee69894351607a /scripts/generate_rust_target.rs
parentspi: spi-mem: Estimate the time taken by operations (diff)
downloadkernel-e896c04890aeff2292364c19632fc15d890d436c.tar.gz
kernel-e896c04890aeff2292364c19632fc15d890d436c.zip
spi: amd: Fix -Wuninitialized in amd_spi_exec_mem_op()
After commit e6204f39fe3a ("spi: amd: Drop redundant check"), clang warns (or errors with CONFIG_WERROR=y): drivers/spi/spi-amd.c:695:9: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized] 695 | return ret; | ^~~ drivers/spi/spi-amd.c:673:9: note: initialize the variable 'ret' to silence this warning 673 | int ret; | ^ | = 0 1 error generated. ret is no longer set on anything other than the default switch path. Replace ret with a direct return of 0 at the end of the function and -EOPNOTSUPP in the default case to resolve the warning. Fixes: e6204f39fe3a ("spi: amd: Drop redundant check") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Nathan Chancellor <[email protected]> Reviewed-by: Miguel Ojeda <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Link: https://patch.msgid.link/20250111-spi-amd-fix-uninitialized-ret-v1-1-c66ab9f6a23d@kernel.org Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'scripts/generate_rust_target.rs')
0 files changed, 0 insertions, 0 deletions