From 493833c3cf574937234a32192aa05f4aefa3e8c6 Mon Sep 17 00:00:00 2001 From: Dmitry Shmidt Date: Tue, 10 Aug 2010 15:20:35 -0700 Subject: [PATCH] net: wireless: bcm4329: Fix unregister_early_suspend() in dhd_detach() Signed-off-by: Dmitry Shmidt --- drivers/net/wireless/bcm4329/dhd_linux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/bcm4329/dhd_linux.c b/drivers/net/wireless/bcm4329/dhd_linux.c index 01a9d768a054..45329e9a8b2c 100644 --- a/drivers/net/wireless/bcm4329/dhd_linux.c +++ b/drivers/net/wireless/bcm4329/dhd_linux.c @@ -2369,7 +2369,8 @@ dhd_detach(dhd_pub_t *dhdp) int i; #if defined(CONFIG_HAS_EARLYSUSPEND) - unregister_early_suspend(&dhd->early_suspend); + if (dhd->early_suspend.suspend) + unregister_early_suspend(&dhd->early_suspend); #endif /* defined(CONFIG_HAS_EARLYSUSPEND) */ #if defined(CONFIG_WIRELESS_EXT) /* Attach and link in the iw */ -- 2.34.1