[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <CU08XUB327HO.3J4AY0JF2ZRL3@syracuse>
Date: Wed, 12 Jul 2023 16:00:20 +0200
From: "Nicolas Escande" <nico.escande@...il.com>
To: "Minjie Du" <duminjie@...o.com>, "Felix Fietkau" <nbd@....name>,
"Lorenzo Bianconi" <lorenzo@...nel.org>,
"Ryder Lee" <ryder.lee@...iatek.com>,
"Shayne Chen" <shayne.chen@...iatek.com>,
"Sean Wang" <sean.wang@...iatek.com>,
"Kalle Valo" <kvalo@...nel.org>,
"Matthias Brugger" <matthias.bgg@...il.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@...labora.com>,
"open list:MEDIATEK MT76 WIRELESS LAN DRIVER"
<linux-wireless@...r.kernel.org>,
"open list:ARM/Mediatek SoC support" <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] drivers: wireless: mt76: fix parameter check in
mt76_register_debugfs_fops()
On Wed Jul 12, 2023 at 3:00 PM CEST, Minjie Du wrote:
> Make IS_ERR() judge the debugfs_create_dir() function return
> in mt76_register_debugfs_fops().
>
> Signed-off-by: Minjie Du <duminjie@...o.com>
> ---
> drivers/net/wireless/mediatek/mt76/debugfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/debugfs.c b/drivers/net/wireless/mediatek/mt76/debugfs.c
> index 57fbcc83e..d9ba70013 100644
> --- a/drivers/net/wireless/mediatek/mt76/debugfs.c
> +++ b/drivers/net/wireless/mediatek/mt76/debugfs.c
> @@ -109,7 +109,7 @@ mt76_register_debugfs_fops(struct mt76_phy *phy,
> struct dentry *dir;
>
> dir = debugfs_create_dir("mt76", phy->hw->wiphy->debugfsdir);
> - if (!dir)
> + if (IS_ERR(dir))
> return NULL;
Check the mailing list this subject has been discussed many times...
I believe the current state of the art is to remove the check altogether
>
> debugfs_create_u8("led_pin", 0600, dir, &phy->leds.pin);
Powered by blists - more mailing lists