[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7721ce10c42eea905a2cef2fcdb0764abf861270.camel@mediatek.com>
Date: Fri, 22 Apr 2022 13:04:53 +0800
From: Rex-BC Chen <rex-bc.chen@...iatek.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.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
On Thu, 2022-04-21 at 11:07 +0200, AngeloGioacchino Del Regno wrote:
> 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
Hello Angelo,
ok, I will do this in next version.
BRs,
Rex
Powered by blists - more mailing lists