Commit ca245a6
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>1 parent c5b8e1d commit ca245a6
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2269 | 2269 | | |
2270 | 2270 | | |
2271 | 2271 | | |
2272 | | - | |
| 2272 | + | |
2273 | 2273 | | |
2274 | 2274 | | |
2275 | 2275 | | |
| |||
2339 | 2339 | | |
2340 | 2340 | | |
2341 | 2341 | | |
| 2342 | + | |
2342 | 2343 | | |
2343 | 2344 | | |
2344 | 2345 | | |
2345 | | - | |
2346 | 2346 | | |
2347 | 2347 | | |
2348 | 2348 | | |
| |||
0 commit comments