Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6f2a6d5 authored by Zhenlin Lian's avatar Zhenlin Lian
Browse files

iio: ch101: Return -ENODEV when get expander GPIO failed



After get expander GPIO failed, the driver should exit probe,
or else it will cause kernel crash in suspend process.

CRs-Fixed: 2880848
Change-Id: Ie06031e0fbc27ea00d646797c86a650748b5ccb6
Signed-off-by: default avatarZhenlin Lian <lianzhenlin@codeaurora.org>
parent c14f9cb7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -335,6 +335,7 @@ static int ch101_i2c_probe(struct i2c_client *client,
	if (!gpio) {
		dev_err(dev, "Error initializing expander: %s\n",
			SX1508_DEVICE_ID);
		return -ENODEV;
	}

	cbk->read_reg = read_reg;