Commit Graph

2 Commits

Author SHA1 Message Date
Dan Carpenter
805bbd3ac9 iio: chemical: mhz19b: Fix error code in probe()
Return -ENOMEM if devm_iio_device_alloc() fails.  Don't return success.

Fixes: 4572a70b36 ("iio: chemical: Add support for Winsen MHZ19B CO2 sensor")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Acked-by: Gyeyoung Baek <gye976@gmail.com>
Link: https://patch.msgid.link/aBtZFLFlr0slcYSi@stanley.mountain
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-05-21 14:21:08 +01:00
Gyeyoung Baek
4572a70b36 iio: chemical: Add support for Winsen MHZ19B CO2 sensor
Add support for Winsen MHZ19B CO2 sensor.

Datasheet: https://www.winsen-sensor.com/d/files/infrared-gas-sensor/mh-z19b-co2-ver1_0.pdf
Signed-off-by: Gyeyoung Baek <gye976@gmail.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://patch.msgid.link/20250423194100.53934-4-gye976@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-05-21 14:20:28 +01:00