aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/nand_bch.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2019-08-11 23:24:46 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2019-08-11 23:24:46 -0700
commit4aa31b4b61e4985e719352c329c3948d1932cb64 (patch)
tree251d6d11d1e5c9c09adc3e0eb1715c56b2e16c95 /drivers/mtd/nand/raw/nand_bch.c
parentInput: remove w90x900 touchscreen driver (diff)
parentLinux 5.3-rc4 (diff)
downloadlinux-dev-4aa31b4b61e4985e719352c329c3948d1932cb64.tar.xz
linux-dev-4aa31b4b61e4985e719352c329c3948d1932cb64.zip
Merge tag 'v5.3-rc4' into next
Sync up with mainline to bring in device_property_count_u32 andother newer APIs.
Diffstat (limited to 'drivers/mtd/nand/raw/nand_bch.c')
-rw-r--r--drivers/mtd/nand/raw/nand_bch.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/nand_bch.c b/drivers/mtd/nand/raw/nand_bch.c
index 55aa4c1cd414..17527310c3a1 100644
--- a/drivers/mtd/nand/raw/nand_bch.c
+++ b/drivers/mtd/nand/raw/nand_bch.c
@@ -170,7 +170,7 @@ struct nand_bch_control *nand_bch_init(struct mtd_info *mtd)
goto fail;
}
- nbc->eccmask = kmalloc(eccbytes, GFP_KERNEL);
+ nbc->eccmask = kzalloc(eccbytes, GFP_KERNEL);
nbc->errloc = kmalloc_array(t, sizeof(*nbc->errloc), GFP_KERNEL);
if (!nbc->eccmask || !nbc->errloc)
goto fail;
@@ -182,7 +182,6 @@ struct nand_bch_control *nand_bch_init(struct mtd_info *mtd)
goto fail;
memset(erased_page, 0xff, eccsize);
- memset(nbc->eccmask, 0, eccbytes);
encode_bch(nbc->bch, erased_page, eccsize, nbc->eccmask);
kfree(erased_page);