summaryrefslogtreecommitdiff
path: root/include/linux/spi/spi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/spi/spi.h')
-rw-r--r--include/linux/spi/spi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index fd8dce4169f7..af7cfee7b8f6 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -1309,7 +1309,7 @@ static inline struct spi_message *spi_message_alloc(unsigned ntrans, gfp_t flags
} *mwt;
unsigned i;
- mwt = kzalloc(struct_size(mwt, t, ntrans), flags);
+ mwt = kzalloc_flex(*mwt, t, ntrans, flags);
if (!mwt)
return NULL;