summaryrefslogtreecommitdiffstats
path: root/fs/isofs
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-01-22 19:32:50 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-04 11:38:00 +0100
commitaa69ea2595ff22f6ccd043e3198f5b0fd2c3a417 (patch)
treea535bd33ec5358cc663d3f5630af12fdb8e11641 /fs/isofs
parent87f6600119a1358166b43416fc33c25b63c8edd7 (diff)
downloadlinux-stable-aa69ea2595ff22f6ccd043e3198f5b0fd2c3a417.tar.gz
linux-stable-aa69ea2595ff22f6ccd043e3198f5b0fd2c3a417.tar.bz2
linux-stable-aa69ea2595ff22f6ccd043e3198f5b0fd2c3a417.zip
regulator: core: Avoid debugfs: Directory ... already present! error
[ Upstream commit dbe954d8f1635f949a1d9a5d6e6fb749ae022b47 ] Sometimes regulator_get() gets called twice for the same supply on the same device. This may happen e.g. when a framework / library is used which uses the regulator; and the driver itself also needs to enable the regulator in some cases where the framework will not enable it. Commit ff268b56ce8c ("regulator: core: Don't spew backtraces on duplicate sysfs") already takes care of the backtrace which would trigger when creating a duplicate consumer symlink under /sys/class/regulator/regulator.%d in this scenario. Commit c33d442328f5 ("debugfs: make error message a bit more verbose") causes a new error to get logged in this scenario: [ 26.938425] debugfs: Directory 'wm5102-codec-MICVDD' with parent 'spi-WM510204:00-MICVDD' already present! There is no _nowarn variant of debugfs_create_dir(), but we can detect and avoid this problem by checking the return value of the earlier sysfs_create_link_nowarn() call. Add a check for the earlier sysfs_create_link_nowarn() failing with -EEXIST and skip the debugfs_create_dir() call in that case, avoiding this error getting logged. Fixes: c33d442328f5 ("debugfs: make error message a bit more verbose") Cc: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210122183250.370571-1-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/isofs')
0 files changed, 0 insertions, 0 deletions