diff options
author | Han Xu <han.xu@nxp.com> | 2017-03-15 00:57:59 -0500 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 1f720674093741b8c4eb41844ce2a71c8da028a2 (patch) | |
tree | c8eb9c9393db2953daa2de2a6193caef10c8187a /drivers/mtd | |
parent | e5cf429109c01658d12716f72150468e681b2136 (diff) |
MLK-14444: mtd: fsl-quadspi: fix logic error when reading dummy cycle
Fix the logic error when reading dummy cycle for qspi ddr quad mode
Signed-off-by: Han Xu <han.xu@nxp.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/spi-nor/spi-nor.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 9f05eb4b5be0..1d538f653e58 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -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; } |