[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dc2018a0-d981-acf3-9822-f01529782aa6@collabora.com>
Date: Thu, 21 Apr 2022 11:07:49 +0200
From: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
To: Rex-BC Chen <rex-bc.chen@...iatek.com>, mturquette@...libre.com,
sboyd@...nel.org
Cc: matthias.bgg@...il.com, p.zabel@...gutronix.de,
chun-jie.chen@...iatek.com, wenst@...omium.org,
runyang.chen@...iatek.com, linux-kernel@...r.kernel.org,
allen-kh.cheng@...iatek.com, linux-clk@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
Project_Global_Chrome_Upstream_Group@...iatek.com
Subject: Re: [PATCH V2 07/12] clk: mediatek: reset: Add return for clock reset
register function
Il 20/04/22 15:05, Rex-BC Chen ha scritto:
> To make error handling, we add return for mtk_clk_register_rst_ctrl().
>
> Signed-off-by: Rex-BC Chen <rex-bc.chen@...iatek.com>
> ---
> drivers/clk/mediatek/reset.c | 14 ++++++++------
> drivers/clk/mediatek/reset.h | 4 ++--
> 2 files changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/clk/mediatek/reset.c b/drivers/clk/mediatek/reset.c
> index d67c13958458..b164b1da7dd3 100644
> --- a/drivers/clk/mediatek/reset.c
> +++ b/drivers/clk/mediatek/reset.c
..snip..
> @@ -103,6 +103,8 @@ void mtk_clk_register_rst_ctrl(struct device_node *np,
> pr_err("could not register reset controller: %d\n", ret);
> kfree(data);
If you return for all error conditions, you can return 0 at the end, so here:
return ret;
> }
> +
> + return ret;
and here:
return 0;
> }
>
> MODULE_LICENSE("GPL");
Cheers,
Angelo
Powered by blists - more mailing lists