]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - block/badblocks.c
badblocks: fix wrong return value in badblocks_set if badblocks are disabled
[thirdparty/linux.git] / block / badblocks.c
index 43c71166e1e2a644b0c59fecdd178524de5e6b4a..91f7bcf979d374537f6dcaf30e2ee0c54947fed4 100644 (file)
@@ -178,7 +178,7 @@ int badblocks_set(struct badblocks *bb, sector_t s, int sectors,
 
        if (bb->shift < 0)
                /* badblocks are disabled */
-               return 0;
+               return 1;
 
        if (bb->shift) {
                /* round the start down, and the end up */