ath79: ar934x-nand: fix broken nand on kernel 5.10
[openwrt/openwrt.git] / target / linux / ath79 / files / drivers / mtd / nand / raw / ar934x_nand.c
index 207bcd59ac3d8d6210014e2e8b670c673a0068fc..ddc6d6d882c2619787eef7392e06101dbd3ce61e 100644 (file)
@@ -1341,7 +1341,7 @@ static int ar934x_nfc_attach_chip(struct nand_chip *nand)
                if (ret)
                        return ret;
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0)
-       } else if (nand->ecc.engine_type == NAND_ECC_ENGINE_TYPE_SOFT) {
+       } else if (nand->ecc.engine_type != NAND_ECC_ENGINE_TYPE_SOFT) {
                dev_err(dev, "unknown ECC mode %d\n", nand->ecc.engine_type);
 #else
        } else if (nand->ecc.mode != NAND_ECC_SOFT) {