From: Timur Tabi <ti...@codeaurora.org>
Date: Fri, 24 Jun 2016 18:46:48 -0500

> +     while (test_and_set_bit(EMAC_STATUS_RESETTING, &adpt->status))
> +             msleep(20); /* Reset might take few 10s of ms */
 ...
> +     while (test_and_set_bit(EMAC_STATUS_RESETTING, &adpt->status))
> +             msleep(20); /* Reset might take few 10s of ms */

You cannot spin in the kernel potentially forever if the tested
condition is never met.

Instead you must have some limit for the loop, and signal a failure
if it is reached.

Reply via email to