Remove unnecessary NULL check from hostapd_config_read_wpa_psk() call

This function is already checking the fname argument against NULL, so
use that check on its own instead of duplicating the check in the only
caller.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2016-12-26 17:42:41 +02:00
parent 9ec3debf24
commit 34e29dfd4b

View file

@ -333,13 +333,7 @@ int hostapd_setup_wpa_psk(struct hostapd_bss_config *conf)
ssid->wpa_psk->group = 1;
}
if (ssid->wpa_psk_file) {
if (hostapd_config_read_wpa_psk(ssid->wpa_psk_file,
&conf->ssid))
return -1;
}
return 0;
return hostapd_config_read_wpa_psk(ssid->wpa_psk_file, &conf->ssid);
}