Skip to contentSkip to conversation

S2io: two branches the same in wait_for_cmd_complete()

PATCH Applied Ramkrishna Vepa 2 participants 2 messages Jan 19, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 S2io: two branches the same in wait_for_cmd_complete()

Fix check to verify if a register bit is set. We have not hit this bug because wait_for_cmd_complete() is always called with S2IO_BIT_RESET. Reported by Roel Kluin <[email protected]>.

---

drivers/net/s2io.c +1 -1
index cc42186..3c4836d 100644
@@ -3421,7 +3421,7 @@ static int wait_for_cmd_complete(void __iomem *addr, u64 busy_bit,
 				break;
 			}
 		} else {
-			if (!(val64 & busy_bit)) {
+			if (val64 & busy_bit) {
 				ret = SUCCESS;
 				break;
 			}