]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - ps.c
iw: Fix return values when parameters are wrong
[thirdparty/iw.git] / ps.c
diff --git a/ps.c b/ps.c
index b774b7e5da22d93e0d7c340adadced2f47dcb60a..de36d2b4b4a89d4291b80ec86707859daeaefa9b 100644 (file)
--- a/ps.c
+++ b/ps.c
@@ -15,10 +15,8 @@ static int set_power_save(struct nl80211_state *state,
 {
        enum nl80211_ps_state ps_state;
 
-       if (argc != 1) {
-               printf("Invalid parameters!\n");
-               return 2;
-       }
+       if (argc != 1)
+               return 1;
 
        if (strcmp(argv[0], "on") == 0)
                ps_state = NL80211_PS_ENABLED;