X-Git-Url: https://git.codelabs.ch/?p=muen%2Flinux.git;a=blobdiff_plain;f=drivers%2Fdma%2Fti%2Fomap-dma.c;h=9b5ca8691f27dcf6561fbd98051b697ab2da6011;hp=b73fb51fbc81b5df080925c8e9853e935afe8288;hb=2996148a9d4169f19a57827003c75605ce3b152b;hpb=67f31971e7c221c1aff7bc023a724ae284c01a14;ds=sidebyside diff --git a/drivers/dma/ti/omap-dma.c b/drivers/dma/ti/omap-dma.c index b73fb51fbc81..9b5ca8691f27 100644 --- a/drivers/dma/ti/omap-dma.c +++ b/drivers/dma/ti/omap-dma.c @@ -917,7 +917,7 @@ static struct dma_async_tx_descriptor *omap_dma_prep_slave_sg( } /* Now allocate and setup the descriptor. */ - d = kzalloc(sizeof(*d) + sglen * sizeof(d->sg[0]), GFP_ATOMIC); + d = kzalloc(struct_size(d, sg, sglen), GFP_ATOMIC); if (!d) return NULL;