From 7fb4eb869e6d3a551dd4f3cdc08d04206fb81e61 Mon Sep 17 00:00:00 2001 From: MarcinJankowskii <135511668+MarcinJankowskii@users.noreply.github.com> Date: Tue, 22 Aug 2023 17:01:23 +0200 Subject: [PATCH] Fix comparison with errno in error check The comparison of errno is corrected from -EEXIST to EEXIST to properly handle the error condition. --- drivers/net/tap/tap_tcmsgs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/tap/tap_tcmsgs.c b/drivers/net/tap/tap_tcmsgs.c index a3aae3c8143..24a0423a0e2 100644 --- a/drivers/net/tap/tap_tcmsgs.c +++ b/drivers/net/tap/tap_tcmsgs.c @@ -261,7 +261,7 @@ qdisc_create_multiq(int nlsk_fd, unsigned int ifindex) int err = 0; err = qdisc_add_multiq(nlsk_fd, ifindex); - if (err < 0 && errno != -EEXIST) { + if (err < 0 && errno != EEXIST) { TAP_LOG(ERR, "Could not add multiq qdisc (%d): %s", errno, strerror(errno)); return -1; @@ -287,7 +287,7 @@ qdisc_create_ingress(int nlsk_fd, unsigned int ifindex) int err = 0; err = qdisc_add_ingress(nlsk_fd, ifindex); - if (err < 0 && errno != -EEXIST) { + if (err < 0 && errno != EEXIST) { TAP_LOG(ERR, "Could not add ingress qdisc (%d): %s", errno, strerror(errno)); return -1;