]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/mtd/nand/nand_base.c
mtd: nand: allow to set only one of ECC size and ECC strength from DT
[karo-tx-linux.git] / drivers / mtd / nand / nand_base.c
index 685376d8ceab2df92a58b27db468fdc1511057ee..d3545c9a792a7d6c216c262ec2671f3afd21c724 100644 (file)
@@ -4225,12 +4225,6 @@ static int nand_dt_init(struct nand_chip *chip)
        ecc_strength = of_get_nand_ecc_strength(dn);
        ecc_step = of_get_nand_ecc_step_size(dn);
 
-       if ((ecc_step >= 0 && !(ecc_strength >= 0)) ||
-           (!(ecc_step >= 0) && ecc_strength >= 0)) {
-               pr_err("must set both strength and step size in DT\n");
-               return -EINVAL;
-       }
-
        if (ecc_mode >= 0)
                chip->ecc.mode = ecc_mode;