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: Olof Johansson <olof@lixom.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Olof Johansson 2018-11-16 19:55:04 -08:00 • committed by Mark Brown
commit 1d2319efb6
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0