[PATCH 4.9 10/51] qed: Fix reading wrong value in loop condition