From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jinjie Ruan <ruanjinjie@huawei.com>
Cc: linux-phy@lists.infradead.org, Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Stanley Chang <stanley_chang@realtek.com>
Subject: Re: [PATCH -next v2] phy: realtek: usb: Drop unnecessary error check for debugfs_create_dir()
Date: Fri, 1 Sep 2023 10:25:54 +0200 [thread overview]
Message-ID: <2023090143-semifinal-espionage-4926@gregkh> (raw)
In-Reply-To: <20230901075231.1368947-1-ruanjinjie@huawei.com>
On Fri, Sep 01, 2023 at 03:52:31PM +0800, Jinjie Ruan wrote:
> Both debugfs_create_dir() and debugfs_create_file() return ERR_PTR
> and never return NULL.
>
> As Greg suggested, this patch removes the error checking for
> debugfs_create_dir in phy-rtk-usb2.c and phy-rtk-usb3.c. This is because
> the DebugFS kernel API is developed in a way that the caller can safely
> ignore the errors that occur during the creation of DebugFS nodes. The
> debugfs APIs have a IS_ERR() judge in start_creating() which can handle it
> gracefully. So these checks are unnecessary.
>
> Fixes: 134e6d25f6bd ("phy: realtek: usb: Add driver for the Realtek SoC USB 2.0 PHY")
> Fixes: adda6e82a7de ("phy: realtek: usb: Add driver for the Realtek SoC USB 3.0 PHY")
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2023-09-01 8:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-01 7:52 [PATCH -next v2] phy: realtek: usb: Drop unnecessary error check for debugfs_create_dir() Jinjie Ruan
2023-09-01 8:25 ` Greg Kroah-Hartman [this message]
2023-09-21 14:26 ` Vinod Koul
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=2023090143-semifinal-espionage-4926@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=kishon@kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=ruanjinjie@huawei.com \
--cc=stanley_chang@realtek.com \
--cc=vkoul@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).