diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2012-02-13 11:23:09 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-22 14:51:12 -0500 |
commit | 1e0f32a43ae652eaa5b23dc06852938555cb8da1 (patch) | |
tree | 374663ec03298f09ad53c1e513e7582da8c508ed /drivers/net/wireless/iwlegacy/4965-mac.c | |
parent | b6603036ad87244bd39ed7bc0612009df7694f5e (diff) |
iwlegacy: always check if got h/w access before write
Before we write to the device register always check if
_il_grap_nic_access() was successful.
Change type return type _il_grap_nic_access() to bool, and
add likely()/unlikely() statements.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy/4965-mac.c')
-rw-r--r-- | drivers/net/wireless/iwlegacy/4965-mac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c index 235812ac6a0..90c9bfb089f 100644 --- a/drivers/net/wireless/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/iwlegacy/4965-mac.c @@ -3778,7 +3778,7 @@ il4965_perform_ct_kill_task(struct il_priv *il) _il_rd(il, CSR_UCODE_DRV_GP1); spin_lock_irqsave(&il->reg_lock, flags); - if (!_il_grab_nic_access(il)) + if (likely(_il_grab_nic_access(il))) _il_release_nic_access(il); spin_unlock_irqrestore(&il->reg_lock, flags); } |