summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdswap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/mtdswap.c')
-rw-r--r--drivers/mtd/mtdswap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c
index 7161f8a17f62..6593879595e3 100644
--- a/drivers/mtd/mtdswap.c
+++ b/drivers/mtd/mtdswap.c
@@ -1340,7 +1340,7 @@ static int mtdswap_init(struct mtdswap_dev *d, unsigned int eblocks,
if (!d->page_buf)
goto page_buf_fail;
- d->oob_buf = kmalloc(2 * mtd->oobavail, GFP_KERNEL);
+ d->oob_buf = kmalloc_array(2, mtd->oobavail, GFP_KERNEL);
if (!d->oob_buf)
goto oob_buf_fail;