linux/arch
Robert Love 640e803376 [PATCH] fix: dmi_check_system
Background:

	1) dmi_check_system() returns the count of the number of
	   matches.  Zero thus means no matches.
	2) A match callback can return nonzero to stop the match
	   checking.

Bug: The count is incremented after we check for the nonzero return value,
so it does not reflect the actual count.  We could say this is intended,
for some dumb reason, except that it means that a match on the first check
returns zero--no matches--if the callback returns nonzero.

Attached patch implements the count before calling the callback and thus
before potentially short-circuiting.

Signed-off-by: Robert Love <rml@novell.com>
Cc: Andrey Panin <pazke@donpac.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07 16:57:44 -07:00
..
alpha [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
arm [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
arm26 [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
cris [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
frv [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
h8300 [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
i386 [PATCH] fix: dmi_check_system 2005-09-07 16:57:44 -07:00
ia64 [PATCH] remove duplicated sys_open32() code from 64bit archs 2005-09-07 16:57:43 -07:00
m32r [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
m68k [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
m68knommu [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
mips [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
parisc [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
ppc [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
ppc64 [PATCH] remove duplicated sys_open32() code from 64bit archs 2005-09-07 16:57:43 -07:00
s390 [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
sh [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
sh64 [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
sparc [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
sparc64 [PATCH] remove duplicated sys_open32() code from 64bit archs 2005-09-07 16:57:43 -07:00
um [PATCH] remove verify_area(): remove verify_area() from various uaccess.h headers 2005-09-07 16:57:35 -07:00
v850 [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
x86_64 [PATCH] remove duplicated sys_open32() code from 64bit archs 2005-09-07 16:57:43 -07:00
xtensa [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00