Skip to content

Commit

Permalink
staging: r8188eu: use time_after_eq(a,b) to replace "a>=b"
Browse files Browse the repository at this point in the history
time_after_eq() deals with timer wrapping correctly.

Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
Link: https://lore.kernel.org/r/20220826020151.10138-1-yuzhe@nfschina.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
yuzhenfschina authored and gregkh committed Aug 30, 2022
1 parent 700f7e2 commit 0b599cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/r8188eu/core/rtw_pwrctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
bool ret = false;

if (adapter->pwrctrlpriv.ips_deny_time >= jiffies)
if (time_after_eq(adapter->pwrctrlpriv.ips_deny_time, jiffies))
goto exit;

if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE | WIFI_SITE_MONITOR) ||
Expand Down

0 comments on commit 0b599cc

Please sign in to comment.