From: Russell King Date: Mon, 8 Dec 2008 17:50:25 +0000 (+0000) Subject: [ARM] dma: ensure that the single entry sg is properly initialized X-Git-Tag: firefly_0821_release~15211^2~52^2~3^2~8 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d667522fdf637ef1b425518afe11aedba80364b2;p=firefly-linux-kernel-4.4.55.git [ARM] dma: ensure that the single entry sg is properly initialized Signed-off-by: Russell King --- diff --git a/arch/arm/kernel/dma.c b/arch/arm/kernel/dma.c index aab24f03ea14..e7828fcd9544 100644 --- a/arch/arm/kernel/dma.c +++ b/arch/arm/kernel/dma.c @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -37,6 +38,9 @@ int __init isa_dma_add(unsigned int chan, dma_t *dma) { if (!dma->d_ops) return -EINVAL; + + sg_init_table(&dma->buf, 1); + if (dma_chan[chan]) return -EBUSY; dma_chan[chan] = dma;