Commit 3e14212f authored by Dmitry Antipov's avatar Dmitry Antipov Committed by Kalle Valo

wifi: libertas: handle possible spu_write_u16() errors

Check and handle (well, report at least, as it's done through the rest
of the module) possible 'spu_write_u16()' errors in 'if_spi_e2h()'.

Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: default avatarDmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230725060531.72968-5-dmantipov@yandex.ru
parent 6c968e90
......@@ -826,11 +826,16 @@ static void if_spi_e2h(struct if_spi_card *card)
goto out;
/* re-enable the card event interrupt */
spu_write_u16(card, IF_SPI_HOST_INT_STATUS_REG,
err = spu_write_u16(card, IF_SPI_HOST_INT_STATUS_REG,
~IF_SPI_HICU_CARD_EVENT);
if (err)
goto out;
/* generate a card interrupt */
spu_write_u16(card, IF_SPI_CARD_INT_CAUSE_REG, IF_SPI_CIC_HOST_EVENT);
err = spu_write_u16(card, IF_SPI_CARD_INT_CAUSE_REG,
IF_SPI_CIC_HOST_EVENT);
if (err)
goto out;
lbs_queue_event(priv, cause & 0xff);
out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment