Remove unnecessary wpa_s == NULL validation

wpa_s cannot be NULL here (it is already dereferenced above and
all the callers pass a valid pointer anyway).
This commit is contained in:
Jouni Malinen 2011-10-16 13:16:21 +03:00
parent 619e6726ba
commit 86c6626c5b

View file

@ -1894,8 +1894,7 @@ int wpas_dbus_unregister_network(struct wpa_supplicant *wpa_s, int nid)
#endif /* CONFIG_P2P */ #endif /* CONFIG_P2P */
/* Do nothing if the control interface is not turned on */ /* Do nothing if the control interface is not turned on */
if (wpa_s == NULL || wpa_s->global == NULL || if (wpa_s->global == NULL || wpa_s->dbus_new_path == NULL)
wpa_s->dbus_new_path == NULL)
return 0; return 0;
ctrl_iface = wpa_s->global->dbus; ctrl_iface = wpa_s->global->dbus;
if (ctrl_iface == NULL) if (ctrl_iface == NULL)