LF-2090: spi: spi-fsl-qspi: fix dereference null return value issue
authorHan Xu <han.xu@nxp.com>
Thu, 22 Apr 2021 19:58:54 +0000 (14:58 -0500)
committerHan Xu <han.xu@nxp.com>
Wed, 5 May 2021 03:29:34 +0000 (22:29 -0500)
commit2f40a8afb86eb44858d683c4eef30b5d4786f8d7
treec335253505d11c06c879e6f978af81bfd221f31a
parentd092f5fb56a8a873f1d7fdf0213d006f35aa7ebf
LF-2090: spi: spi-fsl-qspi: fix dereference null return value issue

dereference null return value issue found by coverity, #18373, CWE-476.
Check if variable res is null first to fix the issue.

Signed-off-by: Han Xu <han.xu@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
drivers/spi/spi-fsl-qspi.c