net: wireless: bcmdhd: Fix division by 0 if dhd_watchdog_ms is 0
Dmitry Shmidt [Thu, 17 May 2012 23:13:20 +0000 (16:13 -0700)]
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

drivers/net/wireless/bcmdhd/dhd_sdio.c

index e817b00..5efa97c 100644 (file)
@@ -5373,7 +5373,7 @@ dhdsdio_pktgen_init(dhd_bus_t *bus)
 
        /* Default to per-watchdog burst with 10s print time */
        bus->pktgen_freq = 1;
-       bus->pktgen_print = 10000 / dhd_watchdog_ms;
+       bus->pktgen_print = dhd_watchdog_ms ? 10000 / dhd_watchdog_ms : 0;
        bus->pktgen_count = (dhd_pktgen * dhd_watchdog_ms + 999) / 1000;
 
        /* Default to echo mode */