mtd: nand: hynix: Fix an error code in init
We should be return -ENOMEM instead of success.
Fixes: 626994e074
("mtd: nand: hynix: Add read-retry support for 1x nm MLC NANDs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
This commit is contained in:
Родитель
44dd182861
Коммит
4ca8c1d497
|
@ -270,8 +270,10 @@ static int hynix_mlc_1xnm_rr_init(struct nand_chip *chip,
|
|||
goto out;
|
||||
|
||||
rr = kzalloc(sizeof(*rr) + (nregs * nmodes), GFP_KERNEL);
|
||||
if (!rr)
|
||||
if (!rr) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (i = 0; i < nmodes; i++) {
|
||||
for (j = 0; j < nregs; j++) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче