diff options
-rw-r--r-- | block/badblocks.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/badblocks.c b/block/badblocks.c index 673ef068423a..ece64e76fe8f 100644 --- a/block/badblocks.c +++ b/block/badblocks.c @@ -1242,14 +1242,15 @@ re_check: len = sectors; update_sectors: + /* This situation should never happen */ + WARN_ON(sectors < len); + s += len; sectors -= len; if (sectors > 0) goto re_check; - WARN_ON(sectors < 0); - if (unacked_badblocks > 0) rv = -1; else if (acked_badblocks > 0) |