Skip to content
Commit b3497ef4 authored by Thierry Reding's avatar Thierry Reding Committed by Wolfram Sang
Browse files

i2c: tegra: Fix failure during probe deferral cleanup



If the driver fails to obtain a DMA channel, it will initiate cleanup
and try to release the DMA channel that couldn't be retrieved. This will
cause a crash because the cleanup will try to dereference an ERR_PTR()-
encoded error code.

However, there's nothing to clean up at this point yet, so we can avoid
this by simply resetting the DMA channel to NULL instead of storing the
error code.

Fixes: fcc8a89a ("i2c: tegra: Share same DMA channel for RX and TX")
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Tested-by: default avatarAkhil R <akhilrajeev@nvidia.com>
Reviewed-by: default avatarAndi Shyti <andi.shyti@kernel.org>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 69f035c4
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