diff options
Diffstat (limited to 'kernel/tracepoint.c')
-rw-r--r-- | kernel/tracepoint.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c index df3ade14ccbd..73956eaff8a9 100644 --- a/kernel/tracepoint.c +++ b/kernel/tracepoint.c | |||
@@ -55,8 +55,8 @@ struct tp_probes { | |||
55 | 55 | ||
56 | static inline void *allocate_probes(int count) | 56 | static inline void *allocate_probes(int count) |
57 | { | 57 | { |
58 | struct tp_probes *p = kmalloc(count * sizeof(struct tracepoint_func) | 58 | struct tp_probes *p = kmalloc(struct_size(p, probes, count), |
59 | + sizeof(struct tp_probes), GFP_KERNEL); | 59 | GFP_KERNEL); |
60 | return p == NULL ? NULL : p->probes; | 60 | return p == NULL ? NULL : p->probes; |
61 | } | 61 | } |
62 | 62 | ||