Commit 6d0f1aae authored by Gaetan Perrot's avatar Gaetan Perrot Committed by Dan Kalowsky
Browse files

drivers: sensors: apds9253: remove unnecessary check



gain is an unsigned int so it can't be negative.

Fixes CID 516230

Signed-off-by: default avatarGaetan Perrot <gaetan.perrot@spacecubics.com>
parent e13f64ac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ static int apds9253_attr_set_gain(const struct device *dev, uint8_t gain)
		APDS9253_LS_GAIN_RANGE_9, APDS9253_LS_GAIN_RANGE_18,
	};

	if (gain < APDS9253_LS_GAIN_RANGE_1 || gain > APDS9253_LS_GAIN_RANGE_18) {
	if (gain > APDS9253_LS_GAIN_RANGE_18) {
		return -EINVAL;
	}
	value = value_map[gain];