Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit da3c66f5 authored by Kishon Vijay Abraham I's avatar Kishon Vijay Abraham I Committed by Dave Gerlach
Browse files

dmaengine: ti: k3-udma: Fix NULL pointer dereference error

bcdma_get_*() and udma_get_*() checks if bchan/rchan/tchan/rflow is
already allocated by checking if it has a NON NULL value. For the
error cases, bchan/rchan/tchan/rflow will have error value
and bcdma_get_*() and udma_get_*() considers this as already allocated
(PASS) since the error values are NON NULL. This results in
NULL pointer dereference error while de-referencing
bchan/rchan/tchan/rflow.

Reset the value of bchan/rchan/tchan/rflow to NULL if the allocation
actually fails.

Fixes: 01779473 ("dmaengine: ti: k3-udma: Initial support for K3 BCDMA")
Fixes: 25dcb5dd

 ("dmaengine: ti: New driver for K3 UDMA")
Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
parent a9d93b26
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