summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2015-07-21 11:30:42 +0300
committerMark Brown <broonie@kernel.org>2015-07-21 13:24:42 +0300
commit1f2112af11e4c330cd070464e95ba9f546b8959b (patch)
tree7b93e156dd940641068af7fb170a334d2e9d62ac
parent54e7ad47c94d26614acb4fcc577a79b3347c2d86 (diff)
downloadlinux-1f2112af11e4c330cd070464e95ba9f546b8959b.tar.xz
spi: mpc512x-psc: fix compiler warning about uninitialized variable
This fixes several warnings like: drivers/spi/spi-mpc512x-psc.c: In function 'mpc512x_psc_spi_prep_xfer_hw': arch/powerpc/include/asm/io.h:163:2: warning: '__ret' may be used uninitialized in this function [-Wmaybe-uninitialized] introduced in commit 8bf960985dfc for some build configurations. Fixes: 8bf960985dfc ("spi: mpc512x-psc: add support for Freescale MPC5125") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/spi/spi-mpc512x-psc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c
index 280794dd248a..1e75341689a6 100644
--- a/drivers/spi/spi-mpc512x-psc.c
+++ b/drivers/spi/spi-mpc512x-psc.c
@@ -40,8 +40,8 @@ enum {
* MPC5121 (which uses a struct mpc52xx_psc) and MPC5125 (using mpc5125_psc).
*/
#define psc_addr(mps, regname) ({ \
- void *__ret; \
- switch(mps->type) { \
+ void *__ret = NULL; \
+ switch (mps->type) { \
case TYPE_MPC5121: { \
struct mpc52xx_psc __iomem *psc = mps->psc; \
__ret = &psc->regname; \