linux/drivers/staging/rtl8712
Sergei Krainov 3f8f36da0c staging: rtl8712: fix wrong function output
Return NULL from r8712_find_network() if no matched wlan_network
was found. Code with a bug:

while (plist != phead) {
	pnetwork = container_of(plist, struct wlan_network, list);
	plist = plist->next;
	if (!memcmp(addr, pnetwork->network.MacAddress, ETH_ALEN))
		break;
}
spin_unlock_irqrestore(&scanned_queue->lock, irqL);
return pnetwork;

In this code last processed pnetwork returned if list end was reached
and no pnetwork matched test condition.

Signed-off-by: Sergei Krainov <sergei.krainov.lkd@gmail.com>
Link: https://lore.kernel.org/r/20210409124611.GA3981@test-VirtualBox
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:16:10 +02:00
..
Kconfig staging: rtl8712: switch to common ieee80211 headers 2020-06-16 21:26:18 +02:00
Makefile
TODO
basic_types.h staging: rtl8712: base_types: Remove unused macros 2020-07-03 10:32:13 +02:00
drv_types.h drivers: staging: rtl8712: _adapter is declared twice 2021-03-26 14:59:33 +01:00
ethernet.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
hal_init.c staging: rtl8712: handle firmware load failure 2020-07-17 12:08:44 +02:00
ieee80211.c staging: rtl8712: Use constants from <linux/ieee80211.h> 2021-04-07 10:19:12 +02:00
ieee80211.h staging: rtl8712: switch to common ieee80211 headers 2020-06-16 21:26:18 +02:00
mlme_linux.c staging: rtl8712: r8712_wdg_timeout_handler: Remove function 2019-06-21 16:46:18 +02:00
mlme_osdep.h drivers: staging: rtl8712: align arguments with open parenthesis 2021-04-06 14:15:56 +02:00
mp_custom_oid.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
os_intfs.c staging: rtl8712: r8712_free_drv_sw(): Change return type 2019-08-08 19:58:15 +02:00
osdep_intf.h staging: rtl8712: Simplify expressions with boolean logic 2020-07-10 13:53:59 +02:00
osdep_service.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
recv_linux.c staging: rtl8712: r8712_os_recvbuf_resource_free(): Change return type 2019-08-02 14:00:56 +02:00
recv_osdep.h staging: rtl8712: r8712_recv_entry(): Change return type 2019-08-08 19:58:14 +02:00
rtl871x_cmd.c staging: rtl8712: Fix possible buffer overflow in r8712_sitesurvey_cmd 2021-03-10 09:23:28 +01:00
rtl871x_cmd.h staging: rtl8712: add blank lines after declarations 2021-04-05 12:12:26 +02:00
rtl871x_debug.h staging: rtl8712: Remove multiple blank lines 2021-02-09 18:42:16 +01:00
rtl871x_eeprom.c staging: rtl8712: Fixed CamelCase for EepromAddressSize 2019-06-10 17:57:21 +02:00
rtl871x_eeprom.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_event.h staging: rtl8712: add blank lines after declarations 2021-04-05 12:12:26 +02:00
rtl871x_ht.h staging: rtl8712: remove struct rtl_ieee80211_ht_cap and ieee80211_ht_addt_info 2021-04-09 16:14:33 +02:00
rtl871x_io.c staging: rtl8712: clean up comparsions to NULL 2020-09-22 09:49:59 +02:00
rtl871x_io.h staging: rtl8712: Remove extra blank lines 2021-04-06 14:16:20 +02:00
rtl871x_ioctl.h
rtl871x_ioctl_linux.c staging: rtl8712: remove struct rtl_ieee80211_ht_cap and ieee80211_ht_addt_info 2021-04-09 16:14:33 +02:00
rtl871x_ioctl_rtl.c staging: rtl8712: Change return values of r8712_getrfreg_cmd() 2019-07-01 10:44:05 +02:00
rtl871x_ioctl_rtl.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_ioctl_set.c staging: rtl8712: r8712_set_802_11_add_wep(): Change return values 2019-07-25 09:52:00 +02:00
rtl871x_ioctl_set.h staging: rtl8712: r8712_set_802_11_add_wep(): Change return values 2019-07-25 09:52:00 +02:00
rtl871x_led.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_mlme.c staging: rtl8712: fix wrong function output 2021-04-09 16:16:10 +02:00
rtl871x_mlme.h staging: rtl8712: Remove extra blank lines 2021-04-06 14:16:20 +02:00
rtl871x_mp.c staging: rtl8712: add blank lines after declarations 2021-04-05 12:12:26 +02:00
rtl871x_mp.h staging: rtl8712: add blank lines after declarations 2021-04-05 12:12:26 +02:00
rtl871x_mp_ioctl.c staging: rtl8712: add blank lines after declarations 2021-04-05 12:12:26 +02:00
rtl871x_mp_ioctl.h staging: Replace zero-length array with flexible-array member 2020-02-23 19:18:54 +01:00
rtl871x_mp_phy_regdef.h staging: rtl8712: Correct a typo in a comment 2020-03-19 15:09:10 +01:00
rtl871x_pwrctrl.c staging: rtl8712: r8712_register_cmd_alive(): Change return values 2019-07-25 09:52:00 +02:00
rtl871x_pwrctrl.h staging: rtl8712: remove extra blank lines 2021-04-05 12:12:26 +02:00
rtl871x_recv.c staging: rtl8712: remove (most of) enum WIFI_FRAME_TYPE 2021-04-09 16:14:33 +02:00
rtl871x_recv.h staging: rtl8712: Remove extra blank lines 2021-04-06 14:16:20 +02:00
rtl871x_rf.h staging: rtl8712: Improve naming of include hearder guards 2019-08-21 05:48:06 -07:00
rtl871x_security.c staging: rtl8712: remove enum WIFI_FRAME_SUBTYPE 2021-04-09 16:14:33 +02:00
rtl871x_security.h staging: rtl8712: add spaces around operators 2021-04-06 14:15:39 +02:00
rtl871x_sta_mgt.c staging: rtl8712: clean up comparsions to NULL 2020-09-22 09:49:59 +02:00
rtl871x_wlan_sme.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_xmit.c staging: rtl8712: remove (most of) enum WIFI_FRAME_TYPE 2021-04-09 16:14:33 +02:00
rtl871x_xmit.h staging: rtl8712: match parentheses alignment 2021-04-06 14:15:40 +02:00
rtl8712_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_cmd.c staging: rtl8712: Remove while loop and check_cmd_fifo() 2019-08-08 19:58:15 +02:00
rtl8712_cmd.h Merge 5.1-rc3 into staging-next 2019-04-01 07:49:24 +02:00
rtl8712_cmdctrl_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_cmdctrl_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_debugctrl_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_debugctrl_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_edcasetting_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_edcasetting_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_efuse.c staging: rtl8712: rtl8712_efuse.c: Remove leading p from variable names 2019-06-20 14:47:28 +02:00
rtl8712_efuse.h staging: rtl8712: rtl8712_efuse.h: alignment should match open parenthesis 2019-03-21 20:08:08 +01:00
rtl8712_event.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_fifoctrl_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_fifoctrl_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_gp_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_gp_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_hal.h staging: rtl8712: fix CamelCase in fw_priv struct 2018-11-07 12:35:10 +01:00
rtl8712_interrupt_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_io.c staging: rtl8712: rename bSurpriseRemoved to surprise_removed 2019-03-18 07:05:18 +01:00
rtl8712_led.c staging: rtl8712: align arguments with open parenthesis in file rtl8712_led.c 2019-10-07 12:29:36 +02:00
rtl8712_macsetting_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_macsetting_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_powersave_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_powersave_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_ratectrl_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_ratectrl_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_recv.c staging: rtl8712: Fix enqueue_reorder_recvframe() 2020-10-01 10:55:17 +02:00
rtl8712_recv.h staging: rtl8712: remove extra blank lines 2021-04-05 12:12:26 +02:00
rtl8712_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_security_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_spec.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_syscfg_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_syscfg_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_timectrl_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_timectrl_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_wmac_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_wmac_regdef.h staging: rtl8712: removed extra blank line 2021-04-08 09:27:59 +02:00
rtl8712_xmit.c staging: rtl8712: add space before binary operator 2021-04-06 14:14:48 +02:00
rtl8712_xmit.h staging: rtl8712: fixed whitespace coding style issue 2021-03-12 17:31:01 +01:00
sta_info.h staging: rtl8712: Remove extra blank lines 2021-04-06 14:16:20 +02:00
usb_halinit.c staging: rtl8712: correct spelling mistake in comment 2020-04-16 12:33:03 +02:00
usb_intf.c staging: rtl8712: clean up comparsions to NULL 2020-09-22 09:49:59 +02:00
usb_ops.c staging: rtl8712: usb_ops.c: Remove leading p from variable names 2019-06-09 13:03:52 +02:00
usb_ops.h staging: rtl8712: matched alignment with open parenthesis 2021-04-08 09:27:58 +02:00
usb_ops_linux.c staging: rtl8712: convert tasklets to use new tasklet_setup() API 2020-09-16 13:13:00 +02:00
usb_osintf.h staging: rtl8712: r8712_free_drv_sw(): Change return type 2019-08-08 19:58:15 +02:00
wifi.h staging: rtl8712: remove (most of) enum WIFI_FRAME_TYPE 2021-04-09 16:14:33 +02:00
wlan_bssdef.h staging: rtl8712: add spaces around '+' 2021-04-09 16:11:23 +02:00
xmit_linux.c staging: rtl8712: r8712_update_attrib(): Change return values and type 2019-08-12 16:37:15 +02:00
xmit_osdep.h staging: rtl8712: match parentheses alignment 2021-04-06 14:15:40 +02:00