[PATCH v2] mtd: Add check and kfree() for kcalloc()