diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-09 00:05:42 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-09 00:05:42 +0100 |
commit | 59d8e5eb2bd5593d8220db0e25206cdfc42e83ea (patch) | |
tree | 5a11524581ff040f2c335fc6a318ff54f100552c /drivers | |
parent | Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetca... (diff) | |
parent | alpha: boot: fix build breakage introduced by system.h disintegration (diff) | |
download | linux-59d8e5eb2bd5593d8220db0e25206cdfc42e83ea.tar.xz linux-59d8e5eb2bd5593d8220db0e25206cdfc42e83ea.zip |
Merge branch 'akpm' (fixes from Andrew)
Merge misc fixes from Andrew Morton.
* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
alpha: boot: fix build breakage introduced by system.h disintegration
memcg: initialize kmem-cache destroying work earlier
Randy has moved
ksm: fix m68k build: only NUMA needs pfn_to_nid
dmi_scan: fix missing check for _DMI_ signature in smbios_present()
Revert parts of "hlist: drop the node parameter from iterators"
idr: remove WARN_ON_ONCE() on negative IDs
mm/mempolicy.c: fix sp_node_init() argument ordering
mm/mempolicy.c: fix wrong sp_node insertion
ipc: don't allocate a copy larger than max
ipc: fix potential oops when src msg > 4k w/ MSG_COPY
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/firmware/dmi_scan.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c index 982f1f5f5742..4cd392dbf115 100644 --- a/drivers/firmware/dmi_scan.c +++ b/drivers/firmware/dmi_scan.c @@ -442,7 +442,6 @@ static int __init dmi_present(const char __iomem *p) static int __init smbios_present(const char __iomem *p) { u8 buf[32]; - int offset = 0; memcpy_fromio(buf, p, 32); if ((buf[5] < 32) && dmi_checksum(buf, buf[5])) { @@ -461,9 +460,9 @@ static int __init smbios_present(const char __iomem *p) dmi_ver = 0x0206; break; } - offset = 16; + return memcmp(p + 16, "_DMI_", 5) || dmi_present(p + 16); } - return dmi_present(buf + offset); + return 1; } void __init dmi_scan_machine(void) |