Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9493150pxu; Mon, 28 Dec 2020 18:36:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzw/3+EzaBpz9ynpGoNYpVFORMTAfUMTglopxbslVPYa9zSw9PcPAYTO2XjR4hvJ5LmP6xA X-Received: by 2002:a50:a692:: with SMTP id e18mr43839183edc.233.1609209413147; Mon, 28 Dec 2020 18:36:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609209413; cv=none; d=google.com; s=arc-20160816; b=VFU/uiRtNXYuYSUxr9ZUcV4VFz85+gS7iXhL3PijMv5o4mk204Al/k5NH0+fgR1Pav tAC9D5OrQ4E827mWSo3pfFmHI2zN4/2gvzavpOMQ4fYYsPVs3KNgz3OM8PBW21Lvbncs jJJ+2jT5ICoHotYS5meOjeay9Ziuet+B012aP0eEnbbGXXN0hRYwLHpdgJeVqrTjUSnL Ezvi2/Zm8z9irnLRge4CyqVk0zkN5KHi0HTDqqsAmLlT3yzx8GbE3o1mV0J8jvWd42na KJo7tw1SQVQpCSzWnnC+coCNFUPSeyVGfP728qgV86mM9374WR4LB/cS1AJ8YCH8E61i S9Sw== 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=AAUOhq5lbXk9kvlIbvppdmwkK1Wav2J60HjYEfImsEU=; b=lfGh/i40wGSuWdkiwuGPTO1Gq1Diq0gIpUh+8oXPAtLoJHY+J7ebm8F20lT6ubIeSG +Ylk2knuvOwBC/7WCVm4DOZSgVfdGIABb/eKp1b6l+5YWRW40zrlgNvMkT/6xE22ZlQn 9BIYfhSpyeiyuAeJef7JsrlFfpyuxlMAeWoAJP7TcC+GCtWXL5AQ/AoM1XSYphV3Xfq4 HqPdPVbbpO2hQBPJBs6hk6JKOIrQ2tBHkviyN6o7tjrAxzfpBFW2xMB5YHWx2D4AEFvn QV93wXibowxvWdjTkFDHZKlWnl48JhBN4Pe57W8q3GNXgCFzBlZImZU0Dt+IVjYFyvnr wUug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pJxCxSG8; 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 z16si19686144ejw.548.2020.12.28.18.36.31; Mon, 28 Dec 2020 18:36:53 -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=pJxCxSG8; 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 S2441314AbgL1OQ7 (ORCPT + 99 others); Mon, 28 Dec 2020 09:16:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:51720 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2441219AbgL1OQi (ORCPT ); Mon, 28 Dec 2020 09:16:38 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BEA41206D4; Mon, 28 Dec 2020 14:15:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164958; bh=i1Dt65RvreWIrBV+6ERdoz0JaZiix6xmnIsd71PAcxQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pJxCxSG8D1IVyY49Rh6mIhdokr9F9ktU4FoCH3nzarORZH8rNNpy5g0H5vE9SMRgL S3faZVoyinGAqtyWhHkXPjVLXPxIpyO397WxDjHvQdNqvcYXJOqhtg/LfvPMtYkpgx cucOmKgU4K18B8IoTmOWX5ZprjFCOJQYfFHvZUho= 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 5.10 360/717] scsi: fnic: Fix error return code in fnic_probe() Date: Mon, 28 Dec 2020 13:45:58 +0100 Message-Id: <20201228125038.260978936@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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 5f8a7ef8f6a8e..4f7befb43d604 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c @@ -740,6 +740,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