]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6d3bdd187a3e268ac351cef6bfa72d940d1f9b4b
treea6054e67cc1921ee67e8751ed16eb2709f92d875
parentd41a1cd34ccfc6d5e8d758750e8b83cbcaea21e4
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