diff options
author | PixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com> | 2023-03-26 19:14:30 -0700 |
---|---|---|
committer | SecurityBot <android-nexus-securitybot@system.gserviceaccount.com> | 2023-03-26 19:14:30 -0700 |
commit | 3bd6d462f21d81c9afdb670c99b137cdbef0c3fb (patch) | |
tree | cf8c3a13a9ecc6803016b2e83ce07ea63383df7a | |
parent | fa2d33f66318c0c1183c28ad5cfba5a01d93a38f (diff) | |
parent | 2bda1c9518373563be560d9e933ce4ce9f3270d6 (diff) | |
download | lwis-3bd6d462f21d81c9afdb670c99b137cdbef0c3fb.tar.gz |
Merge android13-gs-pixel-5.10-tm-qpr3 into android13-gs-pixel-5.10-udc
SBMerger: 516612970
Change-Id: I25e3ab289576e0c312316fd744b8940058987bef
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r-- | lwis_device_i2c.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lwis_device_i2c.c b/lwis_device_i2c.c index 1400d2e..231db39 100644 --- a/lwis_device_i2c.c +++ b/lwis_device_i2c.c @@ -101,6 +101,12 @@ static int lwis_i2c_device_disable(struct lwis_device *lwis_dev) struct lwis_i2c_device *i2c_dev; i2c_dev = container_of(lwis_dev, struct lwis_i2c_device, base_dev); + if (IS_ERR_OR_NULL(i2c_dev->state_pinctrl)) { + dev_err(lwis_dev->dev, "i2c state_pinctrl is invalid (%lu)\n", + PTR_ERR(i2c_dev->state_pinctrl)); + i2c_dev->state_pinctrl = NULL; + } + #if IS_ENABLED(CONFIG_INPUT_STMVL53L1) if (is_shared_i2c_with_stmvl53l1(i2c_dev->state_pinctrl)) { /* Disable the shared i2c bus */ @@ -213,6 +219,7 @@ static int lwis_i2c_device_setup(struct lwis_i2c_device *i2c_dev) if (IS_ERR(pinctrl)) { dev_err(i2c_dev->base_dev.dev, "Cannot instantiate pinctrl instance (%lu)\n", PTR_ERR(pinctrl)); + i2c_dev->state_pinctrl = NULL; return PTR_ERR(pinctrl); } |