mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
staging: rtl8192e: Remove checks of pointer to handle_a.. and handle_b..
Function pointers of handle_assoc_response and handle_beacon is set while executing the probe function. Therefore a NULL pointer check is not required. Remove checks as it is dead code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/5c0fd114c24616bc03271ccb0a72a6bc68e45d61.1677345331.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5e2b6593f2
commit
237fea2f2d
@@ -2689,9 +2689,7 @@ static inline void rtllib_process_probe_response(
|
||||
is_same_network(&ieee->current_network, network,
|
||||
(network->ssid_len ? 1 : 0)) &&
|
||||
(ieee->state == RTLLIB_LINKED)) {
|
||||
if (ieee->handle_beacon != NULL)
|
||||
ieee->handle_beacon(ieee->dev, beacon,
|
||||
&ieee->current_network);
|
||||
ieee->handle_beacon(ieee->dev, beacon, &ieee->current_network);
|
||||
}
|
||||
free_network:
|
||||
kfree(network);
|
||||
|
||||
@@ -2241,10 +2241,8 @@ rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb,
|
||||
memcpy(ieee->ht_info->PeerHTInfoBuf,
|
||||
network->bssht.bd_ht_info_buf,
|
||||
network->bssht.bd_ht_info_len);
|
||||
if (ieee->handle_assoc_response != NULL)
|
||||
ieee->handle_assoc_response(ieee->dev,
|
||||
(struct rtllib_assoc_response_frame *)header,
|
||||
network);
|
||||
ieee->handle_assoc_response(ieee->dev,
|
||||
(struct rtllib_assoc_response_frame *)header, network);
|
||||
}
|
||||
kfree(network);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user