mmc: of_mmc_spi: fix unused warning
authorBrian Norris <computersforpeace@gmail.com>
Mon, 7 Mar 2016 23:36:39 +0000 (15:36 -0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 17 Mar 2016 13:54:40 +0000 (14:54 +0100)
drivers/mmc/host/of_mmc_spi.c: In function 'mmc_spi_get_pdata':
drivers/mmc/host/of_mmc_spi.c:77:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
  int ret = -EINVAL;
      ^

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/of_mmc_spi.c

index 660170cd04d9f51c7253d18272f1113ca1e1b89b..85bbebfde02e4896b6dda821ac86694237c3fa80 100644 (file)
@@ -74,7 +74,6 @@ struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi)
        const u32 *voltage_ranges;
        int num_ranges;
        int i;
-       int ret = -EINVAL;
 
        if (dev->platform_data || !np)
                return dev->platform_data;
@@ -97,7 +96,6 @@ struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi)
                mask = mmc_vddrange_to_ocrmask(be32_to_cpu(voltage_ranges[j]),
                                               be32_to_cpu(voltage_ranges[j + 1]));
                if (!mask) {
-                       ret = -EINVAL;
                        dev_err(dev, "OF: voltage-range #%d is invalid\n", i);
                        goto err_ocr;
                }