Skip to content

Commit aab8a4c

Browse files
committed
mtd: spinand: Add missing check
The update cache variant is mandatory, both read and write versions are being checked, but not this one. All chip drivers seem to implement this variant, so there should be no breakage. Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
1 parent a57b1f0 commit aab8a4c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/mtd/nand/spi/core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,6 +1430,9 @@ int spinand_match_and_init(struct spinand_device *spinand,
14301430

14311431
op = spinand_select_op_variant(spinand,
14321432
info->op_variants.update_cache);
1433+
if (!op)
1434+
return -ENOTSUPP;
1435+
14331436
spinand->op_templates.update_cache = op;
14341437

14351438
return 0;

0 commit comments

Comments
 (0)