[PATCH] soc: ti: k3-ringacc: Use correct error casting in k3_ringacc_dmarings_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use ERR_CAST() when devm_ioremap_resource() fails.

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxx>
---
Hi Vinod,

it came to my attention too late. This patch fixes the sparse warnig introduced
by the AM64 support in
https://lore.kernel.org/lkml/20201208090440.31792-1-peter.ujfalusi@xxxxxx/

Regards,
Peter

 drivers/soc/ti/k3-ringacc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/ti/k3-ringacc.c b/drivers/soc/ti/k3-ringacc.c
index c88c305ba367..b495b0d5d0fa 100644
--- a/drivers/soc/ti/k3-ringacc.c
+++ b/drivers/soc/ti/k3-ringacc.c
@@ -1476,7 +1476,7 @@ struct k3_ringacc *k3_ringacc_dmarings_init(struct platform_device *pdev,
 	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ringrt");
 	base_rt = devm_ioremap_resource(dev, res);
 	if (IS_ERR(base_rt))
-		return base_rt;
+		return ERR_CAST(base_rt);
 
 	ringacc->rings = devm_kzalloc(dev,
 				      sizeof(*ringacc->rings) *
-- 
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux