OpenCloudOS-Kernel/drivers/i2c/muxes
Yang Yingliang 2d47b79d2b i2c: mux: reg: check return value after calling platform_get_resource()
It will cause null-ptr-deref in resource_size(), if platform_get_resource()
returns NULL, move calling resource_size() after devm_ioremap_resource() that
will check 'res' to avoid null-ptr-deref.
And use devm_platform_get_and_ioremap_resource() to simplify code.

Fixes: b3fdd32799 ("i2c: mux: Add register-based mux i2c-mux-reg")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2022-12-07 21:19:32 +01:00
..
Kconfig i2c: muxes: Drop obsolete dependency on COMPILE_TEST 2022-08-23 00:15:01 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
i2c-arb-gpio-challenge.c i2c: muxes: i2c-arb-gpio-challenge: Demote non-conformant kernel-doc headers 2021-05-27 21:29:03 +02:00
i2c-demux-pinctrl.c i2c: mux: demux-pinctrl: do not deactivate a master that is not active 2022-03-20 00:49:43 +01:00
i2c-mux-gpio.c i2c: mux: gpio: Use array_size() helper 2021-11-23 11:54:41 +01:00
i2c-mux-gpmux.c i2c: mux-gpmux: Add of_node_put() when breaking out of loop 2022-07-26 23:10:59 +02:00
i2c-mux-ltc4306.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
i2c-mux-mlxcpld.c i2c: mux: mlxcpld: Add callback to notify mux creation completion 2021-02-09 11:35:44 +01:00
i2c-mux-pca954x.c i2c: mux: pca954x: Convert to i2c's .probe_new() 2022-12-05 10:49:32 +01:00
i2c-mux-pca9541.c i2c: mux: pca9541: switch to using .probe_new 2022-12-05 10:36:18 +01:00
i2c-mux-pinctrl.c i2c: muxes: Drop obsolete dependency on COMPILE_TEST 2022-08-23 00:15:01 +02:00
i2c-mux-reg.c i2c: mux: reg: check return value after calling platform_get_resource() 2022-12-07 21:19:32 +01:00