sfc: avoid division by zero
authorEdward Cree <ecree@solarflare.com>
Wed, 17 Aug 2016 15:00:10 +0000 (16:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Aug 2016 06:28:22 +0000 (23:28 -0700)
The division is already being done properly in efx_ef10_get_timer_config
which returns zero-on-success, unlike the old efx_ef10_get_sysclk_freq.

Fixes: d95e329a55ba ("sfc: get timer configuration from adapter")
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/ef10.c

index b8c9f1884a155e5316812e5e5a440616721b75a5..2a70b1a39d8037dec5d69055fc9ddc640c23df4f 100644 (file)
@@ -646,7 +646,6 @@ static int efx_ef10_probe(struct efx_nic *efx)
        rc = efx_ef10_get_timer_config(efx);
        if (rc < 0)
                goto fail5;
-       efx->timer_quantum_ns = 1536000 / rc; /* 1536 cycles */
 
        rc = efx_mcdi_mon_probe(efx);
        if (rc && rc != -EPERM)