Browse Source

WPS: Merge SetSelectedRegistrar parsing error returns

There is no need to maintain two error paths for this.

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen 9 years ago
parent
commit
92325e7090
1 changed files with 2 additions and 4 deletions
  1. 2 4
      src/wps/wps_upnp_ap.c

+ 2 - 4
src/wps/wps_upnp_ap.c

@@ -34,10 +34,8 @@ int upnp_er_set_selected_registrar(struct wps_registrar *reg,
 
 	wpa_hexdump_buf(MSG_MSGDUMP, "WPS: SetSelectedRegistrar attributes",
 			msg);
-	if (wps_validate_upnp_set_selected_registrar(msg) < 0)
-		return -1;
-
-	if (wps_parse_msg(msg, &attr) < 0)
+	if (wps_validate_upnp_set_selected_registrar(msg) < 0 ||
+	    wps_parse_msg(msg, &attr) < 0)
 		return -1;
 
 	s->reg = reg;