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] [day] [month] [year] [list]
Message-ID: <83993f62-76d7-78ec-4711-b65e95e3aed9@collabora.com>
Date:   Thu, 21 Sep 2023 09:59:56 +0200
From:   AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>
To:     Minjie Du <duminjie@...o.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amitk@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Matthias Brugger <matthias.bgg@...il.com>,
        NĂ­colas F. R. A. Prado 
        <nfraprado@...labora.com>,
        Alexandre Mergnat <amergnat@...libre.com>,
        Chen-Yu Tsai <wenst@...omium.org>,
        Balsam CHIHI <bchihi@...libre.com>,
        "open list:THERMAL" <linux-pm@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        "moderated list:ARM/Mediatek SoC support" 
        <linux-arm-kernel@...ts.infradead.org>,
        "moderated list:ARM/Mediatek SoC support" 
        <linux-mediatek@...ts.infradead.org>
Cc:     opensource.kernel@...o.com
Subject: Re: [PATCH v1] thermal/drivers/mediatek/lvts_thermal: remove extra
 error check in lvts_debugfs_init()

Il 21/09/23 09:55, Minjie Du ha scritto:
> As per the comment above debugfs_create_dir(), it is not expected to
> return an error, so an extra error check is not needed.
> Drop the return check of debugfs_create_dir() in
> lvts_debugfs_init()
> 
> Signed-off-by: Minjie Du <duminjie@...o.com>
> ---
>   drivers/thermal/mediatek/lvts_thermal.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
> index effd9b00a424..171ce25fddf5 100644
> --- a/drivers/thermal/mediatek/lvts_thermal.c
> +++ b/drivers/thermal/mediatek/lvts_thermal.c
> @@ -213,8 +213,6 @@ static int lvts_debugfs_init(struct device *dev, struct lvts_domain *lvts_td)
>   
>   		sprintf(name, "controller%d", i);
>   		dentry = debugfs_create_dir(name, lvts_td->dom_dentry);
> -		if (!dentry)
> -			continue;
>   

This is fine as it is: the `continue` is here in order to avoid allocating regset
if the debugfs dir couldn't be created.
NACK.

Regards,
Angelo

>   		regset = devm_kzalloc(dev, sizeof(*regset), GFP_KERNEL);
>   		if (!regset)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ