mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Dinghao Liu <dinghao.liu@zju.edu.cn>
Cc: linux-scsi@vger.kernel.org, Steffen Maier <maier@linux.ibm.com>,
	Benjamin Block <bblock@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	James Bottomley <James.Bottomley@suse.de>,
	Swen Schillig <swen@vnet.ibm.com>,
	Christof Schmitt <christof.schmitt@de.ibm.com>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v2] scsi: zfcp: Fix a double put in zfcp_port_enqueue
Date: Fri, 22 Sep 2023 14:37:39 -0700	[thread overview]
Message-ID: <f01f34ae-156f-446c-8bf4-f52c439a0f5d@acm.org> (raw)
In-Reply-To: <20230922074631.9408-1-dinghao.liu@zju.edu.cn>

On 9/22/23 00:46, Dinghao Liu wrote:
> diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
> index df782646e856..ad0ef9546501 100644
> --- a/drivers/s390/scsi/zfcp_aux.c
> +++ b/drivers/s390/scsi/zfcp_aux.c
> @@ -552,7 +552,7 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn,
>   
>   	if (device_register(&port->dev)) {
>   		put_device(&port->dev);
> -		goto err_out;
> +		goto err_register;
>   	}
>   
>   	write_lock_irq(&adapter->port_list_lock);
> @@ -565,5 +565,6 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn,
>   
>   err_out:
>   	zfcp_ccw_adapter_put(adapter);
> +err_register:
>   	return ERR_PTR(retval);
>   }

goto labels should be named after the code below the goto label instead
of reflecting where the goto statement comes from.

Thanks,

Bart.

      reply	other threads:[~2023-09-22 21:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22  7:46 Dinghao Liu
2023-09-22 21:37 ` Bart Van Assche [this message]

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=f01f34ae-156f-446c-8bf4-f52c439a0f5d@acm.org \
    --to=bvanassche@acm.org \
    --cc=James.Bottomley@suse.de \
    --cc=agordeev@linux.ibm.com \
    --cc=bblock@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=christof.schmitt@de.ibm.com \
    --cc=dinghao.liu@zju.edu.cn \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=maier@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    --cc=swen@vnet.ibm.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

all inboxes | Powered by JetHome®