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

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

Merge "hwmon: qpnp-adc-voltage: Add scale_type checks"

parents 8b4496d7 151ede65
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1804,7 +1804,9 @@ int32_t qpnp_vadc_channel_monitor(struct qpnp_vadc_chip *chip,
	}

	scale_type = vadc->adc->adc_channels[idx].adc_scale_fn;
	if (scale_type >= SCALE_RSCALE_NONE) {
	if ((scale_type >= SCALE_RVADC_SCALE_NONE) ||
		((scale_type != SCALE_RVADC_ABSOLUTE) &&
		(scale_type != SCALE_RVADC_PMIC_THERM))) {
		rc = -EBADF;
		goto fail_unlock;
	}