]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - cqm.c
iw: bump version to 4.7
[thirdparty/iw.git] / cqm.c
diff --git a/cqm.c b/cqm.c
index 65876afadd13000ae7705633fea9c1b13c58e14c..093b744baba501c3bba645720eca1a826462d4b9 100644 (file)
--- a/cqm.c
+++ b/cqm.c
@@ -9,7 +9,7 @@
 #include "nl80211.h"
 #include "iw.h"
 
-static int iw_cqm_rssi(struct nl80211_state *state, struct nl_cb *cb,
+static int iw_cqm_rssi(struct nl80211_state *state,
                       struct nl_msg *msg, int argc, char **argv,
                       enum id_input id)
 {
@@ -34,6 +34,8 @@ static int iw_cqm_rssi(struct nl80211_state *state, struct nl_cb *cb,
 
        /* connection quality monitor attributes */
        cqm = nlmsg_alloc();
+       if (!cqm)
+               return -ENOMEM;
 
        NLA_PUT_U32(cqm, NL80211_ATTR_CQM_RSSI_THOLD, thold);
        NLA_PUT_U32(cqm, NL80211_ATTR_CQM_RSSI_HYST, hyst);