summaryrefslogtreecommitdiff
path: root/drivers/nfc
diff options
context:
space:
mode:
authorAndrey Rusalin <arusalin@dev.rtsoft.ru>2016-12-28 20:10:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-22 09:17:46 +0100
commit14c63f375b9a94cb39f9b8a669a9d6e530e6bfa9 (patch)
treece61ffc2e70eeb3b8a7ee44435c0670f5d5ebeab /drivers/nfc
parent8f2c9f6c575969c7d5336cae0c73f7f45ffbfd73 (diff)
NFC: pn533: change order of free_irq and dev unregistration
[ Upstream commit 068a496c4525c638ffab56449d905b88ef97fe32 ] Change order of free_irq and dev unregistration. It fixes situation when device already unregistered and an interrupt happens and nobody can handle it. Signed-off-by: Andrey Rusalin <arusalin@dev.rtsoft.ru> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/pn533/i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nfc/pn533/i2c.c b/drivers/nfc/pn533/i2c.c
index 1dc89248e58e..11d78b43cf76 100644
--- a/drivers/nfc/pn533/i2c.c
+++ b/drivers/nfc/pn533/i2c.c
@@ -242,10 +242,10 @@ static int pn533_i2c_remove(struct i2c_client *client)
dev_dbg(&client->dev, "%s\n", __func__);
- pn533_unregister_device(phy->priv);
-
free_irq(client->irq, phy);
+ pn533_unregister_device(phy->priv);
+
return 0;
}