[PATCH v2] dma: ti: k3-udma: Fix error handling for setup_resources() in udma_probe()

Tom Rini trini at konsulko.com
Tue Mar 5 00:44:19 CET 2024


On Tue, Feb 20, 2024 at 03:34:51PM +0530, Siddharth Vadapalli wrote:

> In udma_probe() the return value of setup_resources() is stored in the
> u32 "ch_count" member of "struct udma_dev", due to which any negative
> return value which indicates an error is masked.
> 
> Fix this by storing the return value of setup_resources() in the already
> declared integer variable "ret", followed by assigning it to the "ch_count"
> member of "struct udma_dev" in case of no error.
> 
> While at it, change the "return ret" at the end of udma_probe() to a
> "return 0", to explicitly indicate that probe was successful.
> 
> Fixes: a8837cf43839 ("dma: ti: k3-udma: Query DMA channels allocated from Resource Manager")
> Signed-off-by: Siddharth Vadapalli <s-vadapalli at ti.com>
> Reviewed-by: Dan Carpenter <dan.carpenter at linaro.org>

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240304/1fb06804/attachment.sig>


More information about the U-Boot mailing list