scsi: zfcp: fix missing zfcp_port reference put on -EBUSY from port_remove
authorSteffen Maier <maier@linux.ibm.com>
Thu, 23 May 2019 13:23:45 +0000 (15:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jun 2019 10:22:40 +0000 (12:22 +0200)
commit85494cf86af6f67fe55e090fd9c12df885ac92d9
tree96f26d5d6677d8f71c5d1210de837d5b4e242e86
parent701d744e7e535473dafc97f3b8384ffecd33eef3
scsi: zfcp: fix missing zfcp_port reference put on -EBUSY from port_remove

commit d27e5e07f9c49bf2a6a4ef254ce531c1b4fb5a38 upstream.

With this early return due to zfcp_unit child(ren), we don't use the
zfcp_port reference from the earlier zfcp_get_port_by_wwpn() anymore and
need to put it.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Fixes: d99b601b6338 ("[SCSI] zfcp: restore refcount check on port_remove")
Cc: <stable@vger.kernel.org> #3.7+
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/scsi/zfcp_sysfs.c