Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3319931imu; Sun, 11 Nov 2018 12:17:21 -0800 (PST) X-Google-Smtp-Source: AJdET5fY9D43Y559PgYkS0Mym2BT/23T3+0pSY4qDYWitJIYScKwQ84esDnUKKqrKUy3Mq58RRV2 X-Received: by 2002:a62:507:: with SMTP id 7-v6mr17484909pff.80.1541967441254; Sun, 11 Nov 2018 12:17:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541967441; cv=none; d=google.com; s=arc-20160816; b=xQdpkwvxSD6XxvGBP3DZBjxbTX9f8xV1QM/aLvXbQEE3kRSL3DL5wUz3O+Wn3ylIbK bcRNB6WRq89DMDyMILF8R1pSf4k8IPlLjVKQMgtVyc1WdVCfEB2yS+/zaynEwQqxn7oS Bimw5wKKc6AFSziXmgMkkrf2KSLBTrZrkVwkIUCx1QZBL1tILWce3xrjBWdHTFQqfifp XxtOnLN6kbO6NIG6/ICU+YT6jyJ0uAJ2B8EJdCy+/SsVeKaPGXxPMHlhriwjqgGzENJy IW0BVL/WbAdNLqHiGYdMzewSq3GbYcUmys4wiq6Ec0mdfszSZTi+xUW00gexiZNEQmnC 4PEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=fUUUUFO6waC3KknJwXfnoyQ7bcQxIgAGf7+Fx/ZaB0g=; b=SHlX6J1Wjwu+ws1Q4B2JbzmPbRPj08x2USKJJ79KnqVAgOLLK6eJ8Fk08cOfvV5iE0 8NgV7EB/gE+TAma18LMvNq+DnqC3roHHVkN+Fwk8TvEwD7yINEE5ST9aKe+5sZuPcI9R QorCvHKvxQB6+AobpgkTy/XWZfU3ED/vyzqWvhi/jxyFynqamWk8Zuj4963jlYfRuF67 yzOoeKT0k9aLyJPQ4JEx8+Ky0DraRdgAk0U62UXJ8bTblBiAdQkPskh6nRGuX8xreQ3l h4gjJe11HGiDkzzASto2Ptqwr+liP3ek0NKAdI24HbU+Mh1HzNgx+NB79utM3zIqegFQ X3DA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v19-v6si15716469pfn.26.2018.11.11.12.17.06; Sun, 11 Nov 2018 12:17:21 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731963AbeKLGGQ (ORCPT + 99 others); Mon, 12 Nov 2018 01:06:16 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:53222 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730491AbeKLGGP (ORCPT ); Mon, 12 Nov 2018 01:06:15 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvt9-0000tu-8H; Sun, 11 Nov 2018 19:59:19 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsP-0001RQ-JT; Sun, 11 Nov 2018 19:58:33 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Christophe Jaillet" , "Martin K. Petersen" , "Dan Carpenter" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 067/366] scsi: qlogicpti: Fix an error handling path in 'qpti_sbus_probe()' In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Christophe Jaillet commit 51b910c3c70986a5a0a84eea11cb8e904e37ba8b upstream. The 'free_irq()' call is not at the right place in the error handling path. The changed order has been introduced in commit 3d4253d9afab ("[SCSI] qlogicpti: Convert to new SBUS device framework.") Fixes: 3d4253d9afab ("[SCSI] qlogicpti: Convert to new SBUS device framework.") Signed-off-by: Christophe JAILLET Reviewed-by: Dan Carpenter Signed-off-by: Martin K. Petersen Signed-off-by: Ben Hutchings --- drivers/scsi/qlogicpti.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c @@ -1386,6 +1386,9 @@ fail_unmap_queues: qpti->req_cpu, qpti->req_dvma); #undef QSIZE +fail_free_irq: + free_irq(qpti->irq, qpti); + fail_unmap_regs: of_iounmap(&op->resource[0], qpti->qregs, resource_size(&op->resource[0])); @@ -1393,9 +1396,6 @@ fail_unmap_regs: of_iounmap(&op->resource[0], qpti->sreg, sizeof(unsigned char)); -fail_free_irq: - free_irq(qpti->irq, qpti); - fail_unlink: scsi_host_put(host);