From: Anton Vorontsov Date: Mon, 12 Oct 2009 16:49:22 +0000 (+0400) Subject: spi_mpc8xxx: Fix uninitialized variable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=783058fd582a1d8afbbf1d4e9b7918614a4550ff;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Anton Vorontsov Acked-by: David Brownell Signed-off-by: Kumar Gala --- diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c index 0fd0ec4d3a7d..518671b8afe5 100644 --- a/drivers/spi/spi_mpc8xxx.c +++ b/drivers/spi/spi_mpc8xxx.c @@ -709,6 +709,7 @@ static int of_mpc8xxx_spi_get_chipselects(struct device *dev) gpio = of_get_gpio_flags(np, i, &flags); if (!gpio_is_valid(gpio)) { dev_err(dev, "invalid gpio #%d: %d\n", i, gpio); + ret = gpio; goto err_loop; }