This patch removes dynamic allocation on the stack error.
Signed-off-by: Philip J Kelleher <pjk1939@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
int j;
int cnt;
struct rsxx_dma *dma;
- struct list_head issued_dmas[card->n_targets];
+ struct list_head *issued_dmas;
+
+ issued_dmas = kzalloc(sizeof(*issued_dmas) * card->n_targets,
+ GFP_KERNEL);
for (i = 0; i < card->n_targets; i++) {
INIT_LIST_HEAD(&issued_dmas[i]);
}
spin_unlock(&card->ctrl[i].queue_lock);
}
+
+ kfree(issued_dmas);
}
void rsxx_eeh_cancel_dmas(struct rsxx_cardinfo *card)