From patchwork Wed Dec 28 17:10:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Rusalin X-Patchwork-Id: 9490599 X-Patchwork-Delegate: sameo@linux.intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ED64760488 for ; Wed, 28 Dec 2016 17:42:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2D572621F for ; Wed, 28 Dec 2016 17:42:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7C7826242; Wed, 28 Dec 2016 17:42:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75E482621F for ; Wed, 28 Dec 2016 17:42:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751953AbcL1RmN (ORCPT ); Wed, 28 Dec 2016 12:42:13 -0500 Received: from mail.dev.rtsoft.ru ([213.79.90.226]:54162 "EHLO mail.dev.rtsoft.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751940AbcL1RmI (ORCPT ); Wed, 28 Dec 2016 12:42:08 -0500 Received: from arusalin.dev.rtsoft.ru (arusalin.dev.rtsoft.ru [192.168.14.14]) by mail.dev.rtsoft.ru (Postfix) with ESMTP id 3CD8A41DCA; Wed, 28 Dec 2016 20:11:10 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.dev.rtsoft.ru 3CD8A41DCA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev.rtsoft.ru; s=mail; t=1482945070; bh=3iKHVxv2e6L9ZT7IRLWEN+tiidm7QTqf1u+VtGvkwMQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M/+pRe7dZeHoMquwTEAyExetHFAde8XMcZnNq4pvfM6UEUGy5mKO++Toi6wA8KDMN dzJVQt5YdGpWNOzJsg5XHboGwyQUCSXk2hcO9HtWq3KoryXkiSDKFSmovZ8+z4D9aB zTikRrn9SABNmFAxGPMc79oKhcw0Gh48ltsgPNCk= From: Andrey Rusalin To: lauro.venancio@openbossa.org, aloisio.almeida@openbossa.org, sameo@linux.intel.com, michael.thalmeier@hale.at, linux-wireless@vger.kernel.org, linux-nfc@lists.01.org Cc: Andrey Rusalin Subject: [PATCH 1/3] NFC: pn533: change order of free_irq and dev unregistration Date: Wed, 28 Dec 2016 20:10:57 +0300 Message-Id: <1482945059-12249-2-git-send-email-arusalin@dev.rtsoft.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482945059-12249-1-git-send-email-arusalin@dev.rtsoft.ru> References: <1482945059-12249-1-git-send-email-arusalin@dev.rtsoft.ru> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/nfc/pn533/i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/nfc/pn533/i2c.c b/drivers/nfc/pn533/i2c.c index 5de5a49..e2848e4 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; }