Message ID | 20210226023946.5168-1-dingsenjie@163.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | input: touchscreen: fix reference leak in stmfts_input_open | expand |
diff --git a/drivers/input/touchscreen/stmfts.c b/drivers/input/touchscreen/stmfts.c index 9a64e1d..b91a59b 100644 --- a/drivers/input/touchscreen/stmfts.c +++ b/drivers/input/touchscreen/stmfts.c @@ -338,8 +338,10 @@ static int stmfts_input_open(struct input_dev *dev) int err; err = pm_runtime_get_sync(&sdata->client->dev); - if (err < 0) + if (err < 0) { + pm_runtime_put_noidle(&sdata->client->dev); return err; + } err = i2c_smbus_write_byte(sdata->client, STMFTS_MS_MT_SENSE_ON); if (err)