lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ