[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f01f34ae-156f-446c-8bf4-f52c439a0f5d@acm.org>
Date: Fri, 22 Sep 2023 14:37:39 -0700
From: Bart Van Assche <bvanassche@....org>
To: Dinghao Liu <dinghao.liu@....edu.cn>
Cc: linux-scsi@...r.kernel.org, Steffen Maier <maier@...ux.ibm.com>,
Benjamin Block <bblock@...ux.ibm.com>,
Heiko Carstens <hca@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Alexander Gordeev <agordeev@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>,
James Bottomley <James.Bottomley@...e.de>,
Swen Schillig <swen@...t.ibm.com>,
Christof Schmitt <christof.schmitt@...ibm.com>,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [v2] scsi: zfcp: Fix a double put in zfcp_port_enqueue
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.
Powered by blists - more mailing lists