]> 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)
commit5834c22b11daf28dd97950797f34b9d18ad454dd
treea6054e67cc1921ee67e8751ed16eb2709f92d875
parentee3dea4d382c5a8cf0e3a8572fcb148981f32137
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