···415415 struct i2c_client *client = to_i2c_client(dev);416416 struct auo_pixcir_ts *ts = i2c_get_clientdata(client);417417 struct input_dev *input = ts->input;418418- int ret = 0;418418+ int error;419419420420- mutex_lock(&input->mutex);420420+ guard(mutex)(&input->mutex);421421422422 /* when configured as wakeup source, device should always wake system423423 * therefore start device if necessary···425425 if (device_may_wakeup(&client->dev)) {426426 /* need to start device if not open, to be wakeup source */427427 if (!input_device_enabled(input)) {428428- ret = auo_pixcir_start(ts);429429- if (ret)430430- goto unlock;428428+ error = auo_pixcir_start(ts);429429+ if (error)430430+ return error;431431 }432432433433 enable_irq_wake(client->irq);434434- ret = auo_pixcir_power_mode(ts, AUO_PIXCIR_POWER_SLEEP);434434+ error = auo_pixcir_power_mode(ts, AUO_PIXCIR_POWER_SLEEP);435435+ if (error)436436+ return error;437437+435438 } else if (input_device_enabled(input)) {436436- ret = auo_pixcir_stop(ts);439439+ error = auo_pixcir_stop(ts);440440+ if (error)441441+ return error;437442 }438443439439-unlock:440440- mutex_unlock(&input->mutex);441441-442442- return ret;444444+ return 0;443445}444446445447static int auo_pixcir_resume(struct device *dev)···449447 struct i2c_client *client = to_i2c_client(dev);450448 struct auo_pixcir_ts *ts = i2c_get_clientdata(client);451449 struct input_dev *input = ts->input;452452- int ret = 0;450450+ int error;453451454454- mutex_lock(&input->mutex);452452+ guard(mutex)(&input->mutex);455453456454 if (device_may_wakeup(&client->dev)) {457455 disable_irq_wake(client->irq);458456459457 /* need to stop device if it was not open on suspend */460458 if (!input_device_enabled(input)) {461461- ret = auo_pixcir_stop(ts);462462- if (ret)463463- goto unlock;459459+ error = auo_pixcir_stop(ts);460460+ if (error)461461+ return error;464462 }465463466464 /* device wakes automatically from SLEEP */467465 } else if (input_device_enabled(input)) {468468- ret = auo_pixcir_start(ts);466466+ error = auo_pixcir_start(ts);467467+ if (error)468468+ return error;469469 }470470471471-unlock:472472- mutex_unlock(&input->mutex);473473-474474- return ret;471471+ return 0;475472}476473477474static DEFINE_SIMPLE_DEV_PM_OPS(auo_pixcir_pm_ops,