From: Jens Axboe Date: Sun, 4 Nov 2007 08:44:56 +0000 (+0100) Subject: ieee1394: iso and async streams: s/g list fix X-Git-Tag: v2.6.24-rc2~41^2 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=9e66269d40229cd9823024120910a43af57a9d72;p=linux-2.6-omap-h63xx.git ieee1394: iso and async streams: s/g list fix Torsten Kaiser wrote: > Looking that calltrace upwards, it seems replacing the > memset(dma->sglist,...) with sg_init_table(...) would fix the BUG_ON() > as that inits the SG_MAGIC. Tested-by: Torsten Kaiser Signed-off-by: Stefan Richter --- diff --git a/drivers/ieee1394/dma.c b/drivers/ieee1394/dma.c index f5f4983dfbf..7c4eb39b702 100644 --- a/drivers/ieee1394/dma.c +++ b/drivers/ieee1394/dma.c @@ -103,8 +103,7 @@ int dma_region_alloc(struct dma_region *dma, unsigned long n_bytes, goto err; } - /* just to be safe - this will become unnecessary once sglist->address goes away */ - memset(dma->sglist, 0, dma->n_pages * sizeof(*dma->sglist)); + sg_init_table(dma->sglist, dma->n_pages); /* fill scatter/gather list with pages */ for (i = 0; i < dma->n_pages; i++) {