Received: by 10.223.185.116 with SMTP id b49csp1108641wrg; Sat, 3 Mar 2018 15:49:27 -0800 (PST) X-Google-Smtp-Source: AG47ELtW4TtybmgCDwsGnP8sxgovulEH3034CvNAegY9l2c2qjdQ3k7Wk8NNL0DMGwZT+1JcDKCb X-Received: by 10.98.72.204 with SMTP id q73mr10494120pfi.48.1520120967231; Sat, 03 Mar 2018 15:49:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520120967; cv=none; d=google.com; s=arc-20160816; b=abt6shJLpnNqlGGl5IcBBsmsmk4CKQ+X3oJCp0J8gzFCI0yezBpGY/gCEKKNRZaB6P 3ayhpjjOTooXzp3qhgrpGq8KxPDUQTfpKbxPCXGAWwTW2iCZR4Y+pT494z0LbF/cKXWj bc1j8gPqgHzkncKARoXwz1n7BLnl91IXsv6dd92RPCLgnnxKW0FNu/XDbEnm8gv5qBGa 7rBlW/G1oXXCV8vs4B2citloJIasIpIzWgbB4sAB4OQ1uK97u+47faqVvrgrbHWKLKW1 K4ckPmMD8UZFL9MwBjsYFiWKCjNQH8u9fe1JlIVqqceABQSW6lPwBeIO7bRxwi+/q6ZZ CysQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=mcNeySoyv7pSeotOxstZwxkW3zBO6dGxXfHZtbfKd0E=; b=ko0T5hWQxmJpH6xvcb9y1MT1rxnfouGOXRXstagLebSrqedMz0X6TsHgPsWs74Iimk C2fLsyM/OzbF7bc8HYPfRBQoMwPBc3OXMOKrRdRHgjhOKGjdb7gWSLQQ0xJbuUL/TyIu +Ly9u72ecjcDAACrJ/xmfV5HHM/KTSIUcVIBKxJuDG4wtGzp7NXkirsbtc4gUxu9XCTH ZoTYk4oaN77Xvtp/qYDwIqW2sVYH4UdcEm7LYQ54y08s1A0ZcXTTxxuD6vATtUhRGmy0 +j/rSxWxvZ9HO0JzR/z5WEFZLJLgRwzpVwgkTyXUpTF7H7b0KpM0SaYWp/Y9WTTRTbNa YpSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=MRQiedbr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a15si7441321pff.139.2018.03.03.15.49.13; Sat, 03 Mar 2018 15:49:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=MRQiedbr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934098AbeCCWeB (ORCPT + 99 others); Sat, 3 Mar 2018 17:34:01 -0500 Received: from mail-by2nam03on0128.outbound.protection.outlook.com ([104.47.42.128]:37280 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933058AbeCCWd5 (ORCPT ); Sat, 3 Mar 2018 17:33:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=mcNeySoyv7pSeotOxstZwxkW3zBO6dGxXfHZtbfKd0E=; b=MRQiedbrtDGDHtd9sO0ZvgVwRgi8Q//94isw/w/VpLOr4sw3yTBdUyvy29mGUOJWLxevVNFZJ1wtQkFNDn8HI4v4wpBobfE92IfdXYylivGD0QGn6FS6CbIzPUaKswuV7pxXOsE9tnROI48zC7VT3XVZ46W29Fh8qRYJuAjOHFE= Received: from MW2PR2101MB1034.namprd21.prod.outlook.com (52.132.149.10) by MW2PR2101MB1065.namprd21.prod.outlook.com (52.132.149.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.2; Sat, 3 Mar 2018 22:33:53 +0000 Received: from MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0]) by MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0%3]) with mapi id 15.20.0567.006; Sat, 3 Mar 2018 22:33:53 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Andrey Rusalin , Samuel Ortiz , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 095/219] NFC: pn533: change order of free_irq and dev unregistration Thread-Topic: [PATCH AUTOSEL for 4.9 095/219] NFC: pn533: change order of free_irq and dev unregistration Thread-Index: AQHTsz8BZ0T9FqAouUmrjY7EwYMT/A== Date: Sat, 3 Mar 2018 22:28:50 +0000 Message-ID: <20180303222716.26640-95-alexander.levin@microsoft.com> References: <20180303222716.26640-1-alexander.levin@microsoft.com> In-Reply-To: <20180303222716.26640-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MW2PR2101MB1065;6:1M3IixIYXMUMi2Km8VztjBPnFlJDFJleSz5O192AR9GrrZ6gdoVKIMAayL6LznpP1kCEuCu9tT9yq+Wah6geSTwq4L7WPUu9KtrF1ExMTrZFYNcUxa/1L3SBO+ZgBbtZyh/VmGJaith3/1w7/Hgh5idV7U4HXeiFjJ9dw02EYFjpOg+crpLumtqYR/tIgAODU20qlTkzV+bzmbcS3sq4MZqLdEg/ssJEe5CqsmaASi2CuJE5WsJi/Bn5J/h+yBVYTuBEnZJB0u486bkHZFCOAnDowo+XrxPhETlNqUzbQ3MOu9Nvpq15flp+UUVsjmVH0GYHS0MHHkonu6pYLnvJuRz3cP52qP0nb5p7qDX1/ZLCX3Uaaz7AteBo9VkPmGXz;5:Id63/s4nqCbCPHQiuJs88NYz0CupoePjIGFdy9zhxsMHkvjX+/sKyscH+SMJ68K4AWJ3yUnZR132CZrhNPBVLaoxtSqS6hE4PtHVV5d9c/1d06YTRmhfBKzuKvi3b1urWtSbPAA2BW57Mz3DCLfwABP4/JuDBtNf8yJpSbJWuNU=;24:vzpEIlyqwRGN0RikmQwt19zDIqltBTlxuAQu09jqG7+e3Nl3KkiLggwyRMLh0WRbGw9NdnrcBplzLFkk1th1q1ZX+PzDaMJEZTNjvIRMXzE=;7:bq1IdYi293bKMgVwb6xyzOdnQhZrZd6R1SsKEsuvx83q63XGznfxMIYSdcFXGswQ4W8VrtU4WbTGOF+o0ijO/qrc9WtPhmKq7x+GVo7Ot2/VAYdvsPBBOm3EPMILeWm7jpLL21/+cNF2aYT7mV510ierVHlxRjKnFUFk14OhCagBETL5k/itOn+Gp8i/eoOHTZvcg7Ht7+RZeJwrrRRbjXq65SoB2CoGxqsSDG2ozGmZVJqdzYZCCTAPKKxeTmtC x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 186b0d05-9698-40f8-0ba0-08d58156d7f0 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020);SRVR:MW2PR2101MB1065; x-ms-traffictypediagnostic: MW2PR2101MB1065: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231220)(944501244)(52105095)(6055026)(61426038)(61427038)(6041288)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:MW2PR2101MB1065;BCL:0;PCL:0;RULEID:;SRVR:MW2PR2101MB1065; x-forefront-prvs: 0600F93FE1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(346002)(376002)(396003)(39380400002)(39860400002)(189003)(199004)(6506007)(22452003)(54906003)(25786009)(186003)(2950100002)(102836004)(5250100002)(2501003)(110136005)(97736004)(316002)(2900100001)(36756003)(76176011)(6436002)(59450400001)(6486002)(26005)(4326008)(99286004)(68736007)(4477795004)(6512007)(6116002)(10090500001)(106356001)(105586002)(478600001)(66066001)(107886003)(3660700001)(305945005)(86612001)(14454004)(81166006)(7736002)(86362001)(1076002)(72206003)(2906002)(10290500003)(8676002)(8936002)(81156014)(3846002)(5660300001)(3280700002)(53936002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:MW2PR2101MB1065;H:MW2PR2101MB1034.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: mYjuxkukcFeWeagLt0Rl08oOLr4QTX215fKscGB/6Yk1/2vQn1TYVo2ucW1GSQ6mPuMZeAeSsxRT6nE+S78+k6DzFs4JvO460/TzB9ldEkfhPGYrBLXso2VMfATR9eUFeiY4lUUZHT8CbScYRaJREy7MH6W+YjHi9c4JdRARpCk= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 186b0d05-9698-40f8-0ba0-08d58156d7f0 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2018 22:28:50.8382 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR2101MB1065 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrey Rusalin [ 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 Signed-off-by: Samuel Ortiz Signed-off-by: Sasha Levin --- 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 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= ) =20 dev_dbg(&client->dev, "%s\n", __func__); =20 - pn533_unregister_device(phy->priv); - free_irq(client->irq, phy); =20 + pn533_unregister_device(phy->priv); + return 0; } =20 --=20 2.14.1