5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nikhil Gautam commit 0cb3fc8987038a26ac0f581bfa26b16daf6ca6a7 upstream. The atlas_ezo_read_raw() function rejects channels that are not of type IIO_CONCENTRATION, preventing the relative humidity channel from reading raw and scale values. Remove the early channel type check to allow both concentration and relative humidity channels to reach the mask-specific handling. Fixes: dc3ebfcaa51f ("iio: chemical: atlas-ezo-sensor: add humidity sensor support") Signed-off-by: Nikhil Gautam Reviewed-by: Joshua Crofts Reviewed-by: Matt Ranostay Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/chemical/atlas-ezo-sensor.c | 3 --- 1 file changed, 3 deletions(-) --- a/drivers/iio/chemical/atlas-ezo-sensor.c +++ b/drivers/iio/chemical/atlas-ezo-sensor.c @@ -115,9 +115,6 @@ static int atlas_ezo_read_raw(struct iio struct atlas_ezo_data *data = iio_priv(indio_dev); struct i2c_client *client = data->client; - if (chan->type != IIO_CONCENTRATION) - return -EINVAL; - switch (mask) { case IIO_CHAN_INFO_RAW: { int ret;