diff options
-rw-r--r-- | include/linux/kmemcheck.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/kmemcheck.h b/include/linux/kmemcheck.h index 47b39b7..06c6c55 100644 --- a/include/linux/kmemcheck.h +++ b/include/linux/kmemcheck.h @@ -137,7 +137,10 @@ static inline void kmemcheck_mark_initialized_pages(struct page *p, int name##_end[0]; #define kmemcheck_annotate_bitfield(ptr, name) \ - do if (ptr) { \ + do { \ + if (!ptr) \ + break; \ + \ int _n = (long) &((ptr)->name##_end) \ - (long) &((ptr)->name##_begin); \ BUILD_BUG_ON(_n < 0); \ |