spi: stm32: fix potential dereference null return value
authorAmelie Delaunay <amelie.delaunay@st.com>
Tue, 27 Jun 2017 15:45:20 +0000 (17:45 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 28 Jun 2017 19:00:55 +0000 (20:00 +0100)
commit7b821a6485c943edc752a94260a29116237f9153
treea6054e67cc1921ee67e8751ed16eb2709f92d875
parentc67ad368cf75d4999d5ef86543d082b4b35dd2d7
spi: stm32: fix potential dereference null return value

This patch fixes the usage of rx_dma_desc and tx_dma_desc pointers
returned by dmaengine_prep_slave_sg, which can be null.

Detected by CoverityScan, CID#1446587 ("Dereference null return value")

Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-stm32.c