diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-01-07 09:54:56 +0800 |
---|---|---|
committer | Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com> | 2015-01-07 12:30:54 +0530 |
commit | 1dc7d00f2783991387fe715d61b50fe7b40fd30a (patch) | |
tree | 547851d6f5b81401ab0705bfb88b4f9ae481e001 /drivers | |
parent | d87cbeccc54da2d39e1363e423953d8e24fb2008 (diff) | |
download | u-boot-imx-1dc7d00f2783991387fe715d61b50fe7b40fd30a.zip u-boot-imx-1dc7d00f2783991387fe715d61b50fe7b40fd30a.tar.gz u-boot-imx-1dc7d00f2783991387fe715d61b50fe7b40fd30a.tar.bz2 |
spi: cadence_qspi: Fix checking return value of fdt_first_subnode()
fdt_first_subnode() returns -FDT_ERR_NOTFOUND if no subnode found.
0 is supposed to be a valid offset returns from fdt_first_subnode().
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/cadence_qspi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c index fa95b19..98ae3b8 100644 --- a/drivers/spi/cadence_qspi.c +++ b/drivers/spi/cadence_qspi.c @@ -297,7 +297,7 @@ static int cadence_spi_ofdata_to_platdata(struct udevice *bus) /* All other paramters are embedded in the child node */ subnode = fdt_first_subnode(blob, node); - if (!subnode) { + if (subnode < 0) { printf("Error: subnode with SPI flash config missing!\n"); return -ENODEV; } |