Unverified Commit 9f711c93 authored by Al Viro's avatar Al Viro Committed by Mark Brown
Browse files

regmap: get rid of redundant debugfs_file_{get,put}()



pointless in ->read()/->write() of file_operations used only via
debugfs_create_file()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Link: https://patch.msgid.link/20250702211602.GC3406663@ZenIV


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c8c4694e
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -470,10 +470,6 @@ static ssize_t regmap_cache_only_write_file(struct file *file,
	if (err)
		return count;

	err = debugfs_file_get(file->f_path.dentry);
	if (err)
		return err;

	map->lock(map->lock_arg);

	if (new_val && !map->cache_only) {
@@ -486,7 +482,6 @@ static ssize_t regmap_cache_only_write_file(struct file *file,
	map->cache_only = new_val;

	map->unlock(map->lock_arg);
	debugfs_file_put(file->f_path.dentry);

	if (require_sync) {
		err = regcache_sync(map);
@@ -517,10 +512,6 @@ static ssize_t regmap_cache_bypass_write_file(struct file *file,
	if (err)
		return count;

	err = debugfs_file_get(file->f_path.dentry);
	if (err)
		return err;

	map->lock(map->lock_arg);

	if (new_val && !map->cache_bypass) {
@@ -532,7 +523,6 @@ static ssize_t regmap_cache_bypass_write_file(struct file *file,
	map->cache_bypass = new_val;

	map->unlock(map->lock_arg);
	debugfs_file_put(file->f_path.dentry);

	return count;
}