wl1271: fix timeout in wl1271_top_reg_read
I noticed a timeout bug in /drivers/net/wireless/wl12xx/wl1271_spi.c In the current code you cannot tell why you exited the "poll for data ready" do-while loop if exiting was done after the last possible loop. Then timeout==0 regardless of (val & OCP_READY_MASK) or !(val & OCP_READY_MASK), leading to possible false timeout... Simple correction could be decreasing timeout after checking for !(val & OCP_READY_MASK), not before (Manually converted from email to an actual patch by me. -- JWL) Reported-by: N"Juha Leppanen" <juha_motorsportcom@luukku.com> Signed-off-by: N"Juha Leppanen" <juha_motorsportcom@luukku.com> Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
Showing
想要评论请 注册 或 登录