On 2/7/19 7:31 AM, Dmitry Torokhov wrote: > Hi Marek, > > On Wed, Jan 30, 2019 at 07:48:31AM +0100, Marek Vasut wrote: >> + error = devm_request_irq(dev, client->irq, ili210x_irq, 0, >> + client->name, priv); >> if (error) { >> dev_err(dev, "Unable to request touchscreen IRQ, err: %d\n", >> error); >> - goto err_free_mem; >> + return error; >> } >> >> + error = devm_add_action(dev, ili210x_irq_teardown, priv); >> + if (error) >> + return error; > > Because you want the work be canceled after interrupt is freed, you want > to register the action before requesting irq (devm is unwound on the > order opposite of initialization). > > I changed it to ili210x_cancel_work and moved before call to > devm_request_irq(). Ah, thanks. -- Best regards, Marek Vasut