aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/bpf_doc.py
diff options
context:
space:
mode:
authorHugo Villeneuve <[email protected]>2025-07-03 19:18:29 +0000
committerBartosz Golaszewski <[email protected]>2025-07-04 08:24:03 +0000
commit30e0fd3c0273dc106320081793793a424f1f1950 (patch)
tree28e8ebf9dbf96e9ea8a340464be934fee8908d0e /scripts/bpf_doc.py
parentLinux 6.16-rc4 (diff)
downloadkernel-30e0fd3c0273dc106320081793793a424f1f1950.tar.gz
kernel-30e0fd3c0273dc106320081793793a424f1f1950.zip
gpiolib: fix performance regression when using gpio_chip_get_multiple()
commit 74abd086d2ee ("gpiolib: sanitize the return value of gpio_chip::get_multiple()") altered the value returned by gc->get_multiple() in case it is positive (> 0), but failed to return for other cases (<= 0). This may result in the "if (gc->get)" block being executed and thus negates the performance gain that is normally obtained by using gc->get_multiple(). Fix by returning the result of gc->get_multiple() if it is <= 0. Also move the "ret" variable to the scope where it is used, which as an added bonus fixes an indentation error introduced by the aforementioned commit. Fixes: 74abd086d2ee ("gpiolib: sanitize the return value of gpio_chip::get_multiple()") Cc: [email protected] Signed-off-by: Hugo Villeneuve <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions