Skip to content

Commit

Permalink
[ARM] dma: ensure that the single entry sg is properly initialized
Browse files Browse the repository at this point in the history
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed Dec 11, 2008
1 parent 8c56afc commit d667522
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/kernel/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/errno.h>
#include <linux/scatterlist.h>

#include <asm/dma.h>

Expand All @@ -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;
Expand Down

0 comments on commit d667522

Please sign in to comment.