net: wireless: bcmdhd: Skip dhd_bus_stop() if bus is already down
authorDmitry Shmidt <dimitrysh@google.com>
Fri, 4 Nov 2011 18:08:37 +0000 (11:08 -0700)
committerDmitry Shmidt <dimitrysh@google.com>
Fri, 4 Nov 2011 18:13:35 +0000 (11:13 -0700)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/dhd_linux.c

index e98044279f232340662682caad3f495ebe40e02f..92cdc9b1a4b12e1c28a0208b2c72393a0170a0c5 100644 (file)
@@ -1744,7 +1744,8 @@ dhd_dpc_thread(void *data)
                                        DHD_OS_WAKE_UNLOCK(&dhd->pub);
                                }
                        } else {
-                               dhd_bus_stop(dhd->pub.bus, TRUE);
+                               if (dhd->pub.up)
+                                       dhd_bus_stop(dhd->pub.bus, TRUE);
                                DHD_OS_WAKE_UNLOCK(&dhd->pub);
                        }
                }