hw_features: Merge similar return case in check_40mhz_2g4()

There is no need to have separate return statements for these corner
cases that are unlikely to be hit in practice.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-06-29 20:44:12 +03:00
parent 486f4e3c83
commit 359636170f

View file

@ -272,10 +272,8 @@ int check_40mhz_2g4(struct hostapd_hw_modes *mode,
int affected_start, affected_end;
size_t i;
if (!mode || !scan_res || !pri_chan || !sec_chan)
return 0;
if (pri_chan == sec_chan)
if (!mode || !scan_res || !pri_chan || !sec_chan ||
pri_chan == sec_chan)
return 0;
pri_freq = hw_get_freq(mode, pri_chan);