Skip to content

Commit

Permalink
sfc: avoid division by zero
Browse files Browse the repository at this point in the history
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: d95e329 ("sfc: get timer configuration from adapter")
Signed-off-by: Edward Cree <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ecree-solarflare authored and davem330 committed Aug 19, 2016
1 parent dca0aaf commit c7b256f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/ethernet/sfc/ef10.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c7b256f

Please sign in to comment.