summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/nand_hynix.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/nand_hynix.c')
-rw-r--r--drivers/mtd/nand/nand_hynix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand_hynix.c b/drivers/mtd/nand/nand_hynix.c
index 2a5d0efea498..b12dc7325378 100644
--- a/drivers/mtd/nand/nand_hynix.c
+++ b/drivers/mtd/nand/nand_hynix.c
@@ -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++) {