diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 40f838d54b0fdf4646ade8417e97051378152f7e..2709dc02fc249922578d9a8c4eb63369c90469d4 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c @@ -1517,7 +1517,7 @@ int ubi_bitflip_check(struct ubi_device *ubi, int pnum, int force) mutex_unlock(&ubi->buf_mutex); } - if (err == UBI_IO_BITFLIPS || force) { + if (force || err == UBI_IO_BITFLIPS) { /* * Okay, bit flip happened, let's figure out what we can do. */