Commit 0888071
regulator: core: Streamline debugfs operations
If CONFIG_DEBUG_FS is not set:
regulator: Failed to create debugfs directory
...
regulator-dummy: Failed to create debugfs directory
As per the comments for debugfs_create_dir(), errors returned by this
function should be expected, and ignored:
* If debugfs is not enabled in the kernel, the value -%ENODEV will be
* returned.
*
* NOTE: it's expected that most callers should _ignore_ the errors returned
* by this function. Other debugfs functions handle the fact that the "dentry"
* passed to them could be an error and they don't crash in that case.
* Drivers should generally work fine even if debugfs fails to init anyway.
Adhere to the debugfs spirit, and streamline all operations by:
1. Demoting the importance of the printed error messages to debug
level, like is already done in create_regulator(),
2. Further ignoring any returned errors, as by design, all debugfs
functions are no-ops when passed an error pointer.
Fixes: 2bf1c45 ("regulator: Fix error checking for debugfs_create_dir")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/2f8bb6e113359ddfab7b59e4d4274bd4c06d6d0a.1685013051.git.geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 2715bb1 commit 0888071
1 file changed
Lines changed: 13 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1911 | 1911 | | |
1912 | 1912 | | |
1913 | 1913 | | |
1914 | | - | |
| 1914 | + | |
1915 | 1915 | | |
1916 | | - | |
1917 | | - | |
1918 | | - | |
1919 | | - | |
1920 | | - | |
1921 | | - | |
1922 | | - | |
1923 | | - | |
1924 | | - | |
1925 | | - | |
1926 | | - | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
1927 | 1925 | | |
1928 | 1926 | | |
1929 | 1927 | | |
| |||
5256 | 5254 | | |
5257 | 5255 | | |
5258 | 5256 | | |
5259 | | - | |
5260 | | - | |
5261 | | - | |
5262 | | - | |
| 5257 | + | |
| 5258 | + | |
5263 | 5259 | | |
5264 | 5260 | | |
5265 | 5261 | | |
| |||
6179 | 6175 | | |
6180 | 6176 | | |
6181 | 6177 | | |
6182 | | - | |
| 6178 | + | |
6183 | 6179 | | |
6184 | 6180 | | |
6185 | 6181 | | |
| |||
0 commit comments