Set fault rate to 0 is useless and confusable, so add check to avoid it. Signed-off-by: Chengguang Xu <cgxu519@xxxxxxx> --- drivers/staging/erofs/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c index d2dbc1fd3abb..8df680aee55a 100644 --- a/drivers/staging/erofs/super.c +++ b/drivers/staging/erofs/super.c @@ -166,6 +166,8 @@ static int erofs_build_fault_attr(struct erofs_sb_info *sbi, if (args->from && match_int(args, &rate)) return -EINVAL; + if (!rate) + return -EINVAL; __erofs_build_fault_attr(sbi, rate); return 0; -- 2.17.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel