Skip to content
Commit a93295a7 authored by Roger Quadros's avatar Roger Quadros Committed by Brian Norris
Browse files

mtd: nand: omap2: Don't call dma_release_channel() if dma_request_chan() failed



dma_request_chan() can fail returning an error pointer. In this case
prevent calling dma_release_channel() to prevent a ERR_PTR() dereference.

As error path can be called even with no DMA configuration, info->dma can
be NULL so don't call dma_release_channel() for that case either.

Fixes: de3bfc4a: ("mtd: nand: omap2: fix return value check in omap_nand_probe()")
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
Acked-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 29b4817d
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