[PATCH] soc: mediatek: pm-domains: fix missing error codes

Jay Fang f.fangjian at huawei.com
Mon Mar 15 06:47:57 GMT 2021


From: Zihao Tang <tangzihao1 at hisilicon.com>

Fixes one smatch warnings:

drivers/soc/mediatek/mtk-pm-domains.c:492 scpsys_add_subdomain() warn: missing error code 'ret'

Reported-by: kernel test robot <lkp at intel.com>
Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
Signed-off-by: Zihao Tang <tangzihao1 at hisilicon.com>
Signed-off-by: Jay Fang <f.fangjian at huawei.com>
---
 drivers/soc/mediatek/mtk-pm-domains.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/mediatek/mtk-pm-domains.c b/drivers/soc/mediatek/mtk-pm-domains.c
index b7f6976..5778dad 100644
--- a/drivers/soc/mediatek/mtk-pm-domains.c
+++ b/drivers/soc/mediatek/mtk-pm-domains.c
@@ -487,6 +487,7 @@ static int scpsys_add_subdomain(struct scpsys *scpsys, struct device_node *paren
 
 		child_pd = scpsys_add_one_domain(scpsys, child);
 		if (IS_ERR(child_pd)) {
+			ret = PTR_ERR(child_pd);
 			dev_err_probe(scpsys->dev, PTR_ERR(child_pd),
 				      "%pOF: failed to get child domain id\n", child);
 			goto err_put_node;
-- 
2.7.4




More information about the linux-arm-kernel mailing list