From: Arnd Bergmann Date: Thu, 5 Jun 2014 21:14:39 +0000 (+0200) Subject: mmc: mvsdio: avoid compiler warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d7fe833f3fc9a02806c96dd28f48e5e28c8484a8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mmc: mvsdio: avoid compiler warning gcc correctly points out that hw_state can be used uninitially in the mvsd_setup_data() function. This rearranges the function to ensure it always contains a proper value. Signed-off-by: Arnd Bergmann Cc: Nicolas Pitre Cc: Chris Ball Cc: Thomas Petazzoni Cc: Jason Cooper Cc: Andrew Lunn Cc: linux-mmc@vger.kernel.org Acked-by: Nicolas Pitre Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index 9377284f8544..6b4c5ad3b393 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c @@ -79,11 +79,11 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data) unsigned long t = jiffies + HZ; unsigned int hw_state, count = 0; do { + hw_state = mvsd_read(MVSD_HW_STATE); if (time_after(jiffies, t)) { dev_warn(host->dev, "FIFO_EMPTY bit missing\n"); break; } - hw_state = mvsd_read(MVSD_HW_STATE); count++; } while (!(hw_state & (1 << 13))); dev_dbg(host->dev, "*** wait for FIFO_EMPTY bit "