MLK-14444: mtd: fsl-quadspi: fix logic error when reading dummy cycle
authorHan Xu <han.xu@nxp.com>
Wed, 15 Mar 2017 05:57:59 +0000 (00:57 -0500)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:21:31 +0000 (15:21 -0500)
Fix the logic error when reading dummy cycle for qspi ddr quad mode

Signed-off-by: Han Xu <han.xu@nxp.com>
drivers/mtd/spi-nor/spi-nor.c

index 9f05eb4..1d538f6 100644 (file)
@@ -4,6 +4,7 @@
  *
  * Copyright (C) 2005, Intec Automation Inc.
  * Copyright (C) 2014-2016 Freescale Semiconductor, Inc.
+ * Copyright 2017 NXP
  *
  * This code is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -158,7 +159,7 @@ static inline int spi_nor_read_dummy_cycles(struct spi_nor *nor)
                * controller driver can set it in its child DT node.
                * We parse it out here.
                */
-               if (of_property_read_u32(np,"spi-nor,ddr-quad-read-dummy",
+               if (!of_property_read_u32(np, "spi-nor,ddr-quad-read-dummy",
                                         &dummy))
                        return dummy;
        }