public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nicolas Escande" <nico.escande@gmail.com>
To: "Minjie Du" <duminjie@vivo.com>, "Felix Fietkau" <nbd@nbd.name>,
	"Lorenzo Bianconi" <lorenzo@kernel.org>,
	"Ryder Lee" <ryder.lee@mediatek.com>,
	"Shayne Chen" <shayne.chen@mediatek.com>,
	"Sean Wang" <sean.wang@mediatek.com>,
	"Kalle Valo" <kvalo@kernel.org>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno" 
	<angelogioacchino.delregno@collabora.com>,
	"open list:MEDIATEK MT76 WIRELESS LAN DRIVER" 
	<linux-wireless@vger.kernel.org>,
	"open list:ARM/Mediatek SoC support"
	<linux-kernel@vger.kernel.org>,
	"moderated list:ARM/Mediatek SoC support" 
	<linux-arm-kernel@lists.infradead.org>,
	"moderated list:ARM/Mediatek SoC support" 
	<linux-mediatek@lists.infradead.org>
Cc: <opensource.kernel@vivo.com>
Subject: Re: [PATCH v1] drivers: wireless: mt76: fix parameter check in mt76_register_debugfs_fops()
Date: Wed, 12 Jul 2023 16:00:20 +0200	[thread overview]
Message-ID: <CU08XUB327HO.3J4AY0JF2ZRL3@syracuse> (raw)
In-Reply-To: <20230712130005.15809-1-duminjie@vivo.com>

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@vivo.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);


      reply	other threads:[~2023-07-12 14:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12 13:00 [PATCH v1] drivers: wireless: mt76: fix parameter check in mt76_register_debugfs_fops() Minjie Du
2023-07-12 14:00 ` Nicolas Escande [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CU08XUB327HO.3J4AY0JF2ZRL3@syracuse \
    --to=nico.escande@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=duminjie@vivo.com \
    --cc=kvalo@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=opensource.kernel@vivo.com \
    --cc=ryder.lee@mediatek.com \
    --cc=sean.wang@mediatek.com \
    --cc=shayne.chen@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox