Message ID | 38f2360b-5f45-b6e6-4e7d-a9cc1a43939a@users.sourceforge.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/input/keyboard/mpr121_touchkey.c b/drivers/input/keyboard/mpr121_touchkey.c index 884a74d8a7ed..af840a842246 100644 --- a/drivers/input/keyboard/mpr121_touchkey.c +++ b/drivers/input/keyboard/mpr121_touchkey.c @@ -129,14 +129,13 @@ static irqreturn_t mpr_touchkey_interrupt(int irq, void *dev_id) int reg; reg = i2c_smbus_read_byte_data(client, ELE_TOUCH_STATUS_1_ADDR); - if (reg < 0) { - dev_err(&client->dev, "i2c read error [%d]\n", reg); - goto out; - } + if (reg < 0) + goto report_read_failure; reg <<= 8; reg |= i2c_smbus_read_byte_data(client, ELE_TOUCH_STATUS_0_ADDR); if (reg < 0) { +report_read_failure: dev_err(&client->dev, "i2c read error [%d]\n", reg); goto out; }