Skip to content
Unverified Commit 6532582c authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown
Browse files

spi: spi-geni-qcom: fix error handling in spi_geni_grab_gpi_chan()

This code has several issues:
1) It passes IS_ERR() to dev_err_probe() instead of PTR_ERR().
2) It always prints an error message, even when it succeeds.
3) The "if (ret < 0) {" conditions are never true.
4) If requesting "mas->tx" fails then it sets "mas->rx" to NULL but the
   intention was to set "mas->tx" to NULL.

Fixes: b59c1224

 ("spi: spi-geni-qcom: Add support for GPI dma")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-By: default avatarVinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20211110073935.GA5176@kili
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 12f62a85
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