Merge branch 'core/softlockup' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[firefly-linux-kernel-4.4.55.git] / drivers / mfd / wm8350-core.c
index a285cc0cc704840da473b967e559a62a9ca6fb8a..c2be3088e2e1dd0c2e9936e020fc42e1d7209586 100644 (file)
@@ -1111,7 +1111,7 @@ int wm8350_read_auxadc(struct wm8350 *wm8350, int channel, int scale, int vref)
        do {
                schedule_timeout_interruptible(1);
                reg = wm8350_reg_read(wm8350, WM8350_DIGITISER_CONTROL_1);
-       } while (--tries && (reg & WM8350_AUXADC_POLL));
+       } while ((reg & WM8350_AUXADC_POLL) && --tries);
 
        if (!tries)
                dev_err(wm8350->dev, "adc chn %d read timeout\n", channel);