]> git.itanic.dy.fi Git - linux-stable/commit
rtlwifi: rtl_pci_probe: Fix fail path of _rtl_pci_find_adapter
authorMalcolm Priestley <tvboxspy@gmail.com>
Sun, 30 Jul 2017 08:02:19 +0000 (09:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Sep 2017 15:39:40 +0000 (17:39 +0200)
commitb48f7183c64cd12b7451ea677f964e10acd6a52b
tree6f4a5a7064637cb644debd7cfb5a70e17d56a0ac
parented7a384a904f1d5031b4d10173ef32ab405333a1
rtlwifi: rtl_pci_probe: Fix fail path of _rtl_pci_find_adapter

commit fc81bab5eeb103711925d7510157cf5cd2b153f4 upstream.

_rtl_pci_find_adapter fail path will jump to label fail3 for
unsupported adapter types.

However, on course for fail3 there will be call rtl_deinit_core
before rtl_init_core.

For the inclusion of checking pci_iounmap this fail can be moved to
fail2.

Fixes
[    4.492963] BUG: unable to handle kernel NULL pointer dereference at           (null)
[    4.493067] IP: rtl_deinit_core+0x31/0x90 [rtlwifi]

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/realtek/rtlwifi/pci.c