scsi: bnx2fc: Fix NULL dereference in error handling
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 1 Nov 2018 05:25:30 +0000 (08:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jan 2019 08:50:58 +0000 (09:50 +0100)
commitc0c14b758c0c249e601f0fd84cf4878626a31c8f
tree5b179fb0ab446cc47c00782b3a95f38932d71a4e
parent98ce676bea964cc045babb1878a0267ae47ab323
scsi: bnx2fc: Fix NULL dereference in error handling

[ Upstream commit 9ae4f8420ed7be4b13c96600e3568c144d101a23 ]

If "interface" is NULL then we can't release it and trying to will only
lead to an Oops.

Fixes: aea71a024914 ("[SCSI] bnx2fc: Introduce interface structure for each vlan interface")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/bnx2fc/bnx2fc_fcoe.c