Skip to content
Commit 14a20428 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Mark Brown
Browse files

spi: lp-8841: return correct error code from probe



The spi_lp8841_rtc_probe() function misses an initialization of the
return code when it fails to get its memory resource, as gcc notices:

drivers/spi/spi-lp8841-rtc.c: In function 'spi_lp8841_rtc_probe':
drivers/spi/spi-lp8841-rtc.c:239:9: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This changes the code to propagate the error from devm_ioremap_resource().

Fixes: 7ecbfff6 ("spi: master driver to enable RTC on ICPDAS LP-8841")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Tested-by: default avatarSergei Ianovich <ynvich@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7ecbfff6
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