brcmfmac: make brcmf_p2p_detach() call conditional
authorArend van Spriel <arend@broadcom.com>
Mon, 15 Jun 2015 20:48:39 +0000 (22:48 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 16 Jun 2015 08:35:10 +0000 (11:35 +0300)
commit40b503c76481aecf811a29a14a80c13b429b5e14
treeaa23af53a8c1dcd143de0bd5a6c36398ac529788
parentcb700df8c8a62061b573322c4d0b292a9010aa3c
brcmfmac: make brcmf_p2p_detach() call conditional

During verification of error handling in brcmf_cfg80211_attach() a
null pointer dereference occurred upon calling brcmf_p2p_detach()
from brcmf_detach(). This should only be called when the
brcmf_cfg80211_attach() has succeeded.

Fixes: f7a40873d2fa ("brcmfmac: assure p2pdev is unregistered upon driver unload")
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/brcm80211/brcmfmac/core.c