浏览代码

iio: chemical: vz89x: fix boolreturn.cocci warnings

drivers/iio/chemical/vz89x.c:119:9-10: WARNING: return of 0/1 in function 'vz89x_measurement_is_valid' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

CC: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
kbuild test robot 9 年之前
父节点
当前提交
2535cc7ae0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/iio/chemical/vz89x.c

+ 1 - 1
drivers/iio/chemical/vz89x.c

@@ -160,7 +160,7 @@ static const struct attribute_group vz89x_attrs_group = {
 static bool vz89x_measurement_is_valid(struct vz89x_data *data)
 {
 	if (data->buffer[VZ89X_VOC_SHORT_IDX] == 0)
-		return 1;
+		return true;
 
 	return !!(data->buffer[data->chip->read_size - 1] > 0);
 }