Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6fa0486f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "input: vl53l0x: return ENODEV if vl53l0x not enable"

parents ea0cb145 23c45823
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -963,6 +963,8 @@ static ssize_t stmvl53l0x_show_meter(struct device *dev,
	struct vl_data *data = dev_get_drvdata(dev);
	struct VL_RangingMeasurementData_t Measure;

	if (data->enable_ps_sensor == 0)
		return -ENODEV;
	papi_func_tbl->PerformSingleRangingMeasurement(data, &Measure);
	return snprintf(buf, 7, "%d\n", Measure.RangeMilliMeter);
}