Commit 6ee8a9a
phy: realtek: usb: Drop unnecessary error check for debugfs_create_dir()
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: 134e6d2 ("phy: realtek: usb: Add driver for the Realtek SoC USB 2.0 PHY")
Fixes: adda6e8 ("phy: realtek: usb: Add driver for the Realtek SoC USB 3.0 PHY")
Signed-off-by: Jinjie Ruan <[email protected]>
Suggested-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>1 parent 426e05c commit 6ee8a9a
2 files changed
+4
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
853 | 853 | | |
854 | 854 | | |
855 | 855 | | |
856 | | - | |
857 | | - | |
858 | 856 | | |
859 | | - | |
860 | | - | |
861 | | - | |
| 857 | + | |
| 858 | + | |
862 | 859 | | |
863 | 860 | | |
864 | | - | |
865 | | - | |
866 | | - | |
867 | 861 | | |
868 | 862 | | |
869 | 863 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
419 | | - | |
420 | | - | |
421 | 419 | | |
422 | | - | |
423 | | - | |
424 | | - | |
| 420 | + | |
| 421 | + | |
425 | 422 | | |
426 | 423 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | 424 | | |
431 | 425 | | |
432 | 426 | | |
| |||
0 commit comments