From: Andrey Rusalin Date: Wed, 28 Dec 2016 17:10:57 +0000 (+0300) Subject: NFC: pn533: change order of free_irq and dev unregistration X-Git-Tag: v4.14-rc1~1025^2~129^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=068a496c4525c638ffab56449d905b88ef97fe32;p=platform%2Fkernel%2Flinux-rpi.git NFC: pn533: change order of free_irq and dev unregistration 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 Signed-off-by: Samuel Ortiz --- diff --git a/drivers/nfc/pn533/i2c.c b/drivers/nfc/pn533/i2c.c index 1dc8924..11d78b4 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; }