[PATCH V2 07/12] clk: mediatek: reset: Add return for clock reset register function

Rex-BC Chen rex-bc.chen at mediatek.com
Thu Apr 21 22:04:53 PDT 2022


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 at mediatek.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




More information about the Linux-mediatek mailing list