aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-27 17:21:19 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-27 17:21:19 -0500
commit9c8ff4f4dac189e4111238d54c2b12e7837f4818 (patch)
tree70bd1b82721b56e17ebdbb11b618c47864146061 /drivers
parent86e67a07d4dc8cd40454698f2abb972fced06910 (diff)
parent645a8d94629fd812a220d54876339a1ddafd9bc2 (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: scatterlist: add more safeguards Revert "ll_rw_blk: temporarily enable max_segments tweaking" mmc: Add missing sg_init_table() call block: Fix memory leak in alloc_disk_node() alpha: fix sg_page breakage blktrace: Make sure BLKTRACETEARDOWN does the full cleanup.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/card/queue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index 1b9c9b6da5..30cd13b13a 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -180,12 +180,13 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock
180 blk_queue_max_hw_segments(mq->queue, host->max_hw_segs); 180 blk_queue_max_hw_segments(mq->queue, host->max_hw_segs);
181 blk_queue_max_segment_size(mq->queue, host->max_seg_size); 181 blk_queue_max_segment_size(mq->queue, host->max_seg_size);
182 182
183 mq->sg = kzalloc(sizeof(struct scatterlist) * 183 mq->sg = kmalloc(sizeof(struct scatterlist) *
184 host->max_phys_segs, GFP_KERNEL); 184 host->max_phys_segs, GFP_KERNEL);
185 if (!mq->sg) { 185 if (!mq->sg) {
186 ret = -ENOMEM; 186 ret = -ENOMEM;
187 goto cleanup_queue; 187 goto cleanup_queue;
188 } 188 }
189 sg_init_table(mq->sg, host->max_phys_segs);
189 } 190 }
190 191
191 init_MUTEX(&mq->thread_sem); 192 init_MUTEX(&mq->thread_sem);