LFU-18 spi: fsl_lpspi: Fix dereference before null check
authorYe Li <ye.li@nxp.com>
Thu, 27 May 2021 08:05:44 +0000 (01:05 -0700)
committerYe Li <ye.li@nxp.com>
Thu, 27 May 2021 12:02:34 +0000 (05:02 -0700)
commit9a63654ec976f2712571acfbb898435ab0c3ad3c
tree1ba986f99abde6509f2dbf387d29696117c97e8a
parentb364390d9fb0c4bca23585cfae83a3e0726d16cf
LFU-18 spi: fsl_lpspi: Fix dereference before null check

Fix coverity Issue: 11026161 Dereference before null check
The lpspi should not be dereferenced before null checking, moving
getting its udevice after the checking

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
drivers/spi/fsl_lpspi.c