提交 1f2112af 编写于 作者: U Uwe Kleine-König 提交者: Mark Brown

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 8bf96098 for some build configurations.

Fixes: 8bf96098 ("spi: mpc512x-psc: add support for Freescale MPC5125")
Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 54e7ad47
...@@ -40,8 +40,8 @@ enum { ...@@ -40,8 +40,8 @@ enum {
* MPC5121 (which uses a struct mpc52xx_psc) and MPC5125 (using mpc5125_psc). * MPC5121 (which uses a struct mpc52xx_psc) and MPC5125 (using mpc5125_psc).
*/ */
#define psc_addr(mps, regname) ({ \ #define psc_addr(mps, regname) ({ \
void *__ret; \ void *__ret = NULL; \
switch(mps->type) { \ switch (mps->type) { \
case TYPE_MPC5121: { \ case TYPE_MPC5121: { \
struct mpc52xx_psc __iomem *psc = mps->psc; \ struct mpc52xx_psc __iomem *psc = mps->psc; \
__ret = &psc->regname; \ __ret = &psc->regname; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册