Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Al Viro <viro@zeniv.linux.org.uk>
Link: https://lore.kernel.org/r/20250702211602.GC3406663@ZenIV
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Al Viro and committed by
Greg Kroah-Hartman
8009fb75 2b4b80cf

-10
-10
drivers/base/regmap/regmap-debugfs.c
··· 470 470 if (err) 471 471 return count; 472 472 473 - err = debugfs_file_get(file->f_path.dentry); 474 - if (err) 475 - return err; 476 - 477 473 map->lock(map->lock_arg); 478 474 479 475 if (new_val && !map->cache_only) { ··· 482 486 map->cache_only = new_val; 483 487 484 488 map->unlock(map->lock_arg); 485 - debugfs_file_put(file->f_path.dentry); 486 489 487 490 if (require_sync) { 488 491 err = regcache_sync(map); ··· 512 517 if (err) 513 518 return count; 514 519 515 - err = debugfs_file_get(file->f_path.dentry); 516 - if (err) 517 - return err; 518 - 519 520 map->lock(map->lock_arg); 520 521 521 522 if (new_val && !map->cache_bypass) { ··· 523 532 map->cache_bypass = new_val; 524 533 525 534 map->unlock(map->lock_arg); 526 - debugfs_file_put(file->f_path.dentry); 527 535 528 536 return count; 529 537 }