Thread (4 messages) flat view 4 messages, 2 authors, 2016-02-28

[PATCH] spi: lp-8841: return correct error code from probe

From: Sergei Ianovich <hidden>
Date: 2016-02-25 17:09:50
Also in: linux-spi, lkml

On Thu, 2016-02-25 at 12:37 +0100, Arnd Bergmann wrote:
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().

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 7ecbfff6711f ("spi: master driver to enable RTC on ICPDAS LP-
8841")
Tested-by: Sergei Ianovich <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help