[PATCH -next v2] phy: realtek: usb: Drop unnecessary error check for debugfs_create_dir()
Vinod Koul
vkoul at kernel.org
Thu Sep 21 07:26:14 PDT 2023
On Fri, 01 Sep 2023 15:52:31 +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.
>
> [...]
Applied, thanks!
[1/1] phy: realtek: usb: Drop unnecessary error check for debugfs_create_dir()
commit: 6ee8a9a772b5abd9a9791123ca7aee2dbf126d5f
Best regards,
--
~Vinod
More information about the linux-phy
mailing list