Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: wm8350 tries reaches -1

With a postfix decrement tries will reach -1 rather than 0,
so the warning will not be issued even upon timeout.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>

authored by

Roel Kluin and committed by
Samuel Ortiz
29c6a2e6 a39a021f

+1 -1
+1 -1
drivers/mfd/wm8350-core.c
··· 1111 1111 do { 1112 1112 schedule_timeout_interruptible(1); 1113 1113 reg = wm8350_reg_read(wm8350, WM8350_DIGITISER_CONTROL_1); 1114 - } while (tries-- && (reg & WM8350_AUXADC_POLL)); 1114 + } while (--tries && (reg & WM8350_AUXADC_POLL)); 1115 1115 1116 1116 if (!tries) 1117 1117 dev_err(wm8350->dev, "adc chn %d read timeout\n", channel);