Skip to content
Verified Commit 1d2319ef authored by Olof Johansson's avatar Olof Johansson Committed by Mark Brown
Browse files

spi: npcm: Fix uninitialized variable warning



The compiler has no way to know that rsize 1 or 2 are the only valid
values. Also simplify the code a bit with early return.

The warning was:

drivers/spi/spi-npcm-pspi.c:215:6: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent a1880d38
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment