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

[WATCHDOG] Stop looking for device as soon as one is found

If no address is given for the W83697HF/HG watchdog IO port, stop looping
through possible locations when a watchdog device has been found.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

authored by rfc1149.tngl.sh and committed by

Wim Van Sebroeck 3ff6eb4a bb133450

+3 -1
+3 -1
drivers/watchdog/w83697hf_wdt.c
··· 382 382 /* we will autodetect the W83697HF/HG watchdog */ 383 383 for (i = 0; ((!found) && (w83697hf_ioports[i] != 0)); i++) { 384 384 wdt_io = w83697hf_ioports[i]; 385 - if (!w83697hf_check_wdt()) 385 + if (!w83697hf_check_wdt()) { 386 386 found++; 387 + break; 388 + } 387 389 } 388 390 } else { 389 391 if (!w83697hf_check_wdt())