summaryrefslogtreecommitdiffstats
path: root/include/asm-x86/dmi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/dmi.h')
-rw-r--r--include/asm-x86/dmi.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-x86/dmi.h b/include/asm-x86/dmi.h
index 8e2b0e6..5008c36 100644
--- a/include/asm-x86/dmi.h
+++ b/include/asm-x86/dmi.h
@@ -22,8 +22,9 @@ extern char dmi_alloc_data[DMI_MAX_DATA];
static inline void *dmi_alloc(unsigned len)
{
int idx = dmi_alloc_index;
- if ((dmi_alloc_index += len) > DMI_MAX_DATA)
+ if ((dmi_alloc_index + len) > DMI_MAX_DATA)
return NULL;
+ dmi_alloc_index += len;
return dmi_alloc_data + idx;
}
OpenPOWER on IntegriCloud