PD #83428: don't register wakelock when fail
authorpeter.lin <peter.lin@amlogic.com>
Fri, 6 Dec 2013 01:40:45 +0000 (09:40 +0800)
committerpeter.lin <peter.lin@amlogic.com>
Fri, 6 Dec 2013 01:40:45 +0000 (09:40 +0800)
broadcm_40181/bcmsdh_sdmmc_linux.c

index c98192589bac1bd572a1377405a9046c0b7e93a3..762fba4145824a82abc04c9d6838be80ce835081 100755 (executable)
@@ -147,7 +147,8 @@ static int bcmsdh_sdmmc_probe(struct sdio_func *func,
                ret = -ENODEV;
        }
 #ifdef POWER_OFF_IN_SUSPEND
-       dhd_conf_register_wifi_suspend(func);
+       if (ret == 0)
+               dhd_conf_register_wifi_suspend(func);
 #endif
 
        return ret;