[PATCH V2 07/12] clk: mediatek: reset: Add return for clock reset register function
AngeloGioacchino Del Regno
angelogioacchino.delregno at collabora.com
Thu Apr 21 02:07:49 PDT 2022
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
More information about the Linux-mediatek
mailing list