]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Silence bogus send_event_marker() warning
authorBenjamin Berg <benjamin.berg@intel.com>
Thu, 7 Aug 2025 11:25:34 +0000 (13:25 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 6 Oct 2025 20:15:53 +0000 (23:15 +0300)
The err variable only contains an error if it is negative and positive
values are success. Fix the check to silence the message.

Fixes: 645ec9b58a85 ("nl80211: Do a roundtrip to reset event supressions")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
src/drivers/driver_nl80211.c

index cca5acf6a31171c9c95044ae5d5ac25fdd1b90d5..6e46b67b993403cac9ca624e130ee7f9af26ca0b 100644 (file)
@@ -494,7 +494,7 @@ static int send_event_marker(struct wpa_driver_nl80211_data *drv)
 
 out:
        nlmsg_free(msg);
-       if (err)
+       if (err < 0)
                wpa_printf(MSG_INFO, "nl80211: %s failed: %s",
                           __func__, nl_geterror(err));
        return res;