summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/features.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-18 11:06:17 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-18 11:06:17 +0200
commitb0fc24f36191468bcabc72aaea67ab7a2bb2a13e (patch)
treebc64adf1363a447ad4582deeaa5bb36ffcf6bfcc /tools/lib/bpf/features.c
parent5821bf2dffbe18fe1f097dbb027415fa15a38e9a (diff)
parent6ba59ff4227927d3a8530fc2973b80e94b54d58f (diff)
Merge tag 'v6.10-rc4' into usb-next
We need the USB / Thunderbolt fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib/bpf/features.c')
-rw-r--r--tools/lib/bpf/features.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/lib/bpf/features.c b/tools/lib/bpf/features.c
index 3df0125ed5fa..50befe125ddc 100644
--- a/tools/lib/bpf/features.c
+++ b/tools/lib/bpf/features.c
@@ -393,7 +393,8 @@ static int probe_uprobe_multi_link(int token_fd)
err = -errno; /* close() can clobber errno */
if (link_fd >= 0 || err != -EBADF) {
- close(link_fd);
+ if (link_fd >= 0)
+ close(link_fd);
close(prog_fd);
return 0;
}