linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Finn Thain <fthain@linux-m68k.org>
To: Tong Zhang <ztong0001@gmail.com>
Cc: Oliver Neukum <oliver@neukum.org>, Ali Akcaagac <aliakc@web.de>,
	Jamie Lenehan <lenehan@twibble.org>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	dc395x@twibble.org, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] scsi: dc395: fix error case unwinding
Date: Tue, 21 Sep 2021 09:56:29 +1000 (AEST)	[thread overview]
Message-ID: <a68837f4-1ff7-76d5-7a68-80d2c0dbd95e@linux-m68k.org> (raw)
In-Reply-To: <20210907040702.1846409-1-ztong0001@gmail.com>


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 <ztong0001@gmail.com>

Reviewed-by: Finn Thain <fthain@linux-m68k.org>
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;
>  	}
>  
> 

  parent reply	other threads:[~2021-09-20 23:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07  4:07 [PATCH v1] scsi: dc395: fix error case unwinding Tong Zhang
2021-09-08  0:39 ` Finn Thain
2021-09-20 23:56 ` Finn Thain [this message]
2021-09-29  4:20 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a68837f4-1ff7-76d5-7a68-80d2c0dbd95e@linux-m68k.org \
    --to=fthain@linux-m68k.org \
    --cc=aliakc@web.de \
    --cc=dc395x@twibble.org \
    --cc=jejb@linux.ibm.com \
    --cc=lenehan@twibble.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=oliver@neukum.org \
    --cc=ztong0001@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).