Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9172283pxu; Mon, 28 Dec 2020 08:22:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4bLzvBrHR4IfgMrDMvmSKrLSWdgVkUMBXrcrCPVRf4Z1BI5SnTJxEuME73XStPBFJnXbb X-Received: by 2002:a05:6402:697:: with SMTP id f23mr43724669edy.318.1609172526182; Mon, 28 Dec 2020 08:22:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172526; cv=none; d=google.com; s=arc-20160816; b=BJ0W/00sTeFou5eDCqtMGiATrO3kvYrr5GnalETSlnxY8UVuXt7a2r+v6ic378jqs5 r5cTa6o3RoUXXUUNi1J9+ZyrjofXY6IzSVlhXGFgT4bDqt8U1XQk209GFVNcfkOi0QLj CzDk23tdyKE2TFGdVxQNS2i6i0KkUSGM+Uuzlhf6Tbqj8Hex4sXcLk5KVoTHuLB6I5a7 2Slj7yNmvbCLx+aFW7tVXytT2xRhO/GmW1fRpQZnvQchr9cBbURHA2El7Cp48SZZ2y+F If9l8lzpt4wGQRCPboGqZ7l7GNM8YSGl26iiFaMbeNXKKsx5bTFNRfsRaLsHfmYAf40Z tXhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mAAlXyXbbUiKow5lf/TWK09Zz5El8LlH6/7lFNqIJDQ=; b=B8yFu9Xah1xRLx+V9diBNH7dR4KShYfD505belat+/+RVBUrK16Iol9/dZBcQTJKRg zNlqUIWGSxqDPBe/j6Pw0Tn6xLWZwbNbwytVjfUO1wSHzk5/kNJInAUwNnDDPD2GXVeT aAVaxFAtn5JMnT6Ux6RgwKXuhxdeP62sK4FH5rcsZMph0lCH0FMMbhoZIVtqici8FvYK Cucc6Dg1qVjNJLXXRbDPiZ0JzhhjI+IUyDV2w2FjSHxhvb9UR9UKBQPEaB251zQPIOJT aCj3JUVMP2roK4B9a5J0veuSStSidHVTPbIargR8g7JDMqj1ARYkhyma0wdEK3HTJGnw qe4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F5yTuuaG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga12si18212382ejb.522.2020.12.28.08.21.42; Mon, 28 Dec 2020 08:22:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F5yTuuaG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732530AbgL1NOj (ORCPT + 99 others); Mon, 28 Dec 2020 08:14:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:42616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732440AbgL1NOd (ORCPT ); Mon, 28 Dec 2020 08:14:33 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 563DF20776; Mon, 28 Dec 2020 13:13:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161232; bh=1HKm8A/RJzXlQcgNFDpF2YbZ7UZI3cbSrbp3YAdUJyg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F5yTuuaG1fX/h++/dESBq1ZSUCD3oom2k3xuqdZX2P7T/dHsMeYKoFB/hr6k5D75E 85w3ir0I6xtA/udQPr+K7q5zLSLA01Q7eP5F7I32xaoWtkd/WYODP7FQGg23Y6Pd28 2wL/On0vy0Ms676rR+BeRuvUENf/NadKA2dtZIUY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Karan Tilak Kumar , Zhang Changzhong , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.14 147/242] scsi: fnic: Fix error return code in fnic_probe() Date: Mon, 28 Dec 2020 13:49:12 +0100 Message-Id: <20201228124911.941490459@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhang Changzhong [ Upstream commit d4fc94fe65578738ded138e9fce043db6bfc3241 ] Return a negative error code from the error handling case instead of 0 as done elsewhere in this function. Link: https://lore.kernel.org/r/1607068060-31203-1-git-send-email-zhangchangzhong@huawei.com Fixes: 5df6d737dd4b ("[SCSI] fnic: Add new Cisco PCI-Express FCoE HBA") Reported-by: Hulk Robot Reviewed-by: Karan Tilak Kumar Signed-off-by: Zhang Changzhong Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/fnic/fnic_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index aacadbf20b695..878e486762729 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c @@ -746,6 +746,7 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) for (i = 0; i < FNIC_IO_LOCKS; i++) spin_lock_init(&fnic->io_req_lock[i]); + err = -ENOMEM; fnic->io_req_pool = mempool_create_slab_pool(2, fnic_io_req_cache); if (!fnic->io_req_pool) goto err_out_free_resources; -- 2.27.0