Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
[sfrench/cifs-2.6.git] / drivers / mtd / nand / atmel / pmecc.c
index 146af82183145d9d5164665aeaccdf789c4cca98..8268636675efc8b3d81959f0f1911a145c42fcc1 100644 (file)
@@ -363,7 +363,7 @@ atmel_pmecc_create_user(struct atmel_pmecc *pmecc,
        size += (req->ecc.strength + 1) * sizeof(u16);
        /* Reserve space for mu, dmu and delta. */
        size = ALIGN(size, sizeof(s32));
-       size += (req->ecc.strength + 1) * sizeof(s32);
+       size += (req->ecc.strength + 1) * sizeof(s32) * 3;
 
        user = kzalloc(size, GFP_KERNEL);
        if (!user)