Skip to content
Unverified Commit 5790597d authored by Li-hao Kuo's avatar Li-hao Kuo Committed by Mark Brown
Browse files

spi: Fix warning for Clang build and simplify code

Clang build fails with
spi-sunplus-sp7021.c:405:2: error: variable 'ret' is used
  uninitialized whenever switch default is taken
        default:

simplify code

Restore initializing ret. and add return error at default

Fixes: 47e8fe57

 ("spi: Modify irq request position and modify parameters")
Reported-by: default avatarTom Rix <trix@redhat.com>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
Reported-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarLi-hao Kuo <lhjeff911@gmail.com>
Link: https://lore.kernel.org/r/7d91e6ce29f9a8df2c53a47b4b977664020e237a.1644805060.git.lhjeff911@gmail.com
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2cbfa212
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment