Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2380922pxb; Mon, 20 Sep 2021 20:50:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwP1yHRJIx9PIxFgE7pr9FR2wG6n8Qb5yeSRwgTF0iu/8LVvAJB9yAYeKeYe2FjonvWbHPC X-Received: by 2002:a17:907:33ce:: with SMTP id zk14mr32458123ejb.84.1632196203962; Mon, 20 Sep 2021 20:50:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632196203; cv=none; d=google.com; s=arc-20160816; b=yCuRTh0gUiggHEFuNa5SizElmqx6YvpcNVgiXpHAJk5v86QGXE63udHo0nqRfQ1rIE 3jOyZJMXx4dIKMjcuKXzJYFp85RdS4QH06nDTUlQ30p5VWKeVvAkpZdHi4+MISTdXOPO +FhvHl4t7bPdvdTSfoBLvx8CzfFZbRTN41qpz0MsBKPASHjNvZa/Mgt6q4mHsVVsgTCs HHQxWt3rpn0oANhWqDZMbI2iZfodjxXW6ICAIPFglaN+N8LtUgaOo8ktnNE4ja4FDhfy PovJZBbLFkSZs+1a4laTDjt1bsOpd/gAFtmlSB7GtkAp9ugw52JuC1MvAFQD308pLKnh /gvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=kEcYYWe7Fo4F3ypOF0RisLR7B9ji3PdFfB/b9jqi6Xg=; b=UmLwb3Hczii7ngU5uB0iovsA84xwVRaVXl1NK/W7lWiDQ9EYsvDPRj96ISbE8BHWPI 10yPYw+1P73BoVp1TU4HusnsGgZpzI6xsbJMcSBa5S0Y8bu1t+QQU9DEVhHXUQ63DCLj pZP0GVVRSi0UkEDU7RO+2MoDOodCqO7NcMJRHpiTAY8meOtcMGfNpFosrXu5/RwY4G0e Jy9wpOAjHec+VDhwSuPhEC5CrvmKt+t/ralMOmofLXpqmX5z830A+aRnIuRHWHcVJ0t2 0xe2mvGskg3NOQKQYjVSfIM8tUBFZ/CCgWS3jIxl9PUFmnz+thRp/HdRk/V4RdeuH4ZC B6Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=B5AzkoiJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t2si18119927edr.42.2021.09.20.20.49.40; Mon, 20 Sep 2021 20:50:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=B5AzkoiJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243004AbhIUAAL (ORCPT + 99 others); Mon, 20 Sep 2021 20:00:11 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:33229 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239514AbhITX6J (ORCPT ); Mon, 20 Sep 2021 19:58:09 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 939B25C00DF; Mon, 20 Sep 2021 19:56:40 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 20 Sep 2021 19:56:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=kEcYYW e7Fo4F3ypOF0RisLR7B9ji3PdFfB/b9jqi6Xg=; b=B5AzkoiJg/YgLkdds0E0RT jxD+1aLa8nBSN8d2vtwjlYlebFb7SYzGfHyDpuPinKAPHRF2E5bvawpTes/e5p4Q TDTxfz95FNJ14Mirg8NaB/0K+Vhe7dV7uKZ54uY7pi4WAI1oMA5fxy/WGBZc42uS jjIprygfFk3yBe81qlX0LJ7U5wPqMjsSryhaO6S/GUxXHDoWJd7R0SaX/dP0TbkM e2VNvn0Sxu7nqVJwAcF2APLHkLK2L1x9YW28KyDjiW8M5PWooci8Gm6YZVhQbu41 Ju4lYzrdUZCo5HC7ccmAVsi+m2IqG05ujpiUuTqHNBTbq9w+tAFYdEVfjpymKfiQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeifedgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffujgfkfhggtgesthdtredttddtvdenucfhrhhomhephfhinhhnucfv hhgrihhnuceofhhthhgrihhnsehlihhnuhigqdhmieekkhdrohhrgheqnecuggftrfgrth htvghrnhepffduhfegfedvieetudfgleeugeehkeekfeevfffhieevteelvdfhtdevffet uedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepfh hthhgrihhnsehlihhnuhigqdhmieekkhdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Sep 2021 19:56:36 -0400 (EDT) Date: Tue, 21 Sep 2021 09:56:29 +1000 (AEST) From: Finn Thain To: Tong Zhang cc: Oliver Neukum , Ali Akcaagac , Jamie Lenehan , "James E.J. Bottomley" , "Martin K. Petersen" , dc395x@twibble.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] scsi: dc395: fix error case unwinding In-Reply-To: <20210907040702.1846409-1-ztong0001@gmail.com> Message-ID: References: <20210907040702.1846409-1-ztong0001@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 6 Sep 2021, Tong Zhang wrote: > dc395x_init_one()->adapter_init() might fail. In this case, the acb > is already clean up by adapter_init(), no need to do that in > adapter_uninit(acb) again. > > [ 1.252251] dc395x: adapter init failed > [ 1.254900] RIP: 0010:adapter_uninit+0x94/0x170 [dc395x] > [ 1.260307] Call Trace: > [ 1.260442] dc395x_init_one.cold+0x72a/0x9bb [dc395x] > > Signed-off-by: Tong Zhang Reviewed-by: Finn Thain Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > --- > drivers/scsi/dc395x.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c > index 24c7cefb0b78..1c79e6c27163 100644 > --- a/drivers/scsi/dc395x.c > +++ b/drivers/scsi/dc395x.c > @@ -4618,6 +4618,7 @@ static int dc395x_init_one(struct pci_dev *dev, const struct pci_device_id *id) > /* initialise the adapter and everything we need */ > if (adapter_init(acb, io_port_base, io_port_len, irq)) { > dprintkl(KERN_INFO, "adapter init failed\n"); > + acb = NULL; > goto fail; > } > >