Procházet zdrojové kódy

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 <arusalin@dev.rtsoft.ru>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Andrey Rusalin před 8 roky
rodič
revize
068a496c45
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      drivers/nfc/pn533/i2c.c

+ 2 - 2
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;
 }