summaryrefslogtreecommitdiffstats
path: root/crypto/tcrypt.c
diff options
context:
space:
mode:
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>2024-06-24 17:30:50 +0200
committerLee Jones <lee@kernel.org>2024-06-26 17:49:59 +0200
commitb337cc3ce47549528fc3ee0b8c7ebd33348a3126 (patch)
tree828f328affb3a2bc78ab4134d3c9f0d42294974d /crypto/tcrypt.c
parentbacklight: Drop explicit initialization of struct i2c_device_id::driver_data ... (diff)
downloadlinux-b337cc3ce47549528fc3ee0b8c7ebd33348a3126.tar.xz
linux-b337cc3ce47549528fc3ee0b8c7ebd33348a3126.zip
backlight: lm3509_bl: Fix early returns in for_each_child_of_node()
The for_each_child_of_node() macro automatically decrements the child refcount at the end of every iteration. On early exits, of_node_put() must be used to manually decrement the refcount and avoid memory leaks. The scoped version of the macro accounts for such early breaks, fixing the early exits without the need for explicit calls to of_node_put(). Reported-by: kernel test robot <lkp@intel.com> Reported-by: Julia Lawall <julia.lawall@inria.fr> Closes: https://lore.kernel.org/r/202406172314.2vVgelaS-lkp@intel.com/ Fixes: b72755f5b577 ("backlight: Add new lm3509 backlight driver") Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20240624-lm3509_bl_scoped-v1-1-ceba9df38f23@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'crypto/tcrypt.c')
0 files changed, 0 insertions, 0 deletions