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

Matthias Brugger matthias.bgg at gmail.com
Tue Mar 30 11:06:54 BST 2021


Hi Zihao,

On 15/03/2021 07:47, Jay Fang wrote:
> 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>

That got already fixed by Enric [1]. Anway thanks for the patch.

Matthias

[1]
https://patchwork.kernel.org/project/linux-mediatek/patch/20210303091054.796975-1-enric.balletbo@collabora.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;
> 



More information about the linux-arm-kernel mailing list