summaryrefslogtreecommitdiff
path: root/drivers/dma/st_fdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/st_fdma.c')
-rw-r--r--drivers/dma/st_fdma.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dma/st_fdma.c b/drivers/dma/st_fdma.c
index 954f7cf62bb1..bc7a1de3f29b 100644
--- a/drivers/dma/st_fdma.c
+++ b/drivers/dma/st_fdma.c
@@ -243,8 +243,7 @@ static struct st_fdma_desc *st_fdma_alloc_desc(struct st_fdma_chan *fchan,
struct st_fdma_desc *fdesc;
int i;
- fdesc = kzalloc(sizeof(*fdesc) +
- sizeof(struct st_fdma_sw_node) * sg_len, GFP_NOWAIT);
+ fdesc = kzalloc(struct_size(fdesc, node, sg_len), GFP_NOWAIT);
if (!fdesc)
return NULL;