]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: temperature: mlx90635: Fix ERR_PTR dereference in mlx90635_probe()
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Mon, 13 May 2024 20:34:27 +0000 (13:34 -0700)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 27 May 2024 08:49:20 +0000 (09:49 +0100)
commita23c14b062d8800a2192077d83273bbfe6c7552d
treebba451c5f6c0ce45f452811515c0df67fee53c7c
parentbedb2ccb566de5ca0c336ca3fd3588cea6d50414
iio: temperature: mlx90635: Fix ERR_PTR dereference in mlx90635_probe()

When devm_regmap_init_i2c() fails, regmap_ee could be error pointer,
instead of checking for IS_ERR(regmap_ee), regmap is checked which looks
like a copy paste error.

Fixes: a1d1ba5e1c28 ("iio: temperature: mlx90635 MLX90635 IR Temperature sensor")
Reviewed-by: Crt Mori<cmo@melexis.com>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://lore.kernel.org/r/20240513203427.3208696-1-harshit.m.mogalapalli@oracle.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/temperature/mlx90635.c