提交 783058fd 编写于 作者: A Anton Vorontsov 提交者: Kumar Gala

spi_mpc8xxx: Fix uninitialized variable

This patch fixes the following warning:

CC      drivers/spi/spi_mpc8xxx.o
  spi_mpc8xxx.c: In function 'of_mpc8xxx_spi_probe':
  spi_mpc8xxx.c:681: warning: 'ret' may be used uninitialized in this function
Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
上级 58c12bdc
...@@ -709,6 +709,7 @@ static int of_mpc8xxx_spi_get_chipselects(struct device *dev) ...@@ -709,6 +709,7 @@ static int of_mpc8xxx_spi_get_chipselects(struct device *dev)
gpio = of_get_gpio_flags(np, i, &flags); gpio = of_get_gpio_flags(np, i, &flags);
if (!gpio_is_valid(gpio)) { if (!gpio_is_valid(gpio)) {
dev_err(dev, "invalid gpio #%d: %d\n", i, gpio); dev_err(dev, "invalid gpio #%d: %d\n", i, gpio);
ret = gpio;
goto err_loop; goto err_loop;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册