Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9038103pxu; Mon, 28 Dec 2020 05:07:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbDB3EViph9GWbhswBe/vuc2fIsmCTWo5fSvMp3ux1zAmykPfF3zvuUIa4VbhkF7Mr8/Db X-Received: by 2002:a17:906:5182:: with SMTP id y2mr42543793ejk.92.1609160830845; Mon, 28 Dec 2020 05:07:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609160830; cv=none; d=google.com; s=arc-20160816; b=l8YohP1kPSwwHK63L8FhUtfHorNhmOGp97IHoMcqf5DdeQAae8sUtianrbI1mLr/// VtjZXQ4LsUWEfnIuPWREk52b+oATr2LYMq9XNKODJpfi5Ot8ZStiHGrwcxBE8YM6yeEF r5VDYVaMXUufgWOpsjy9p3kdHW8l/ytZ3ru5KlJoJrOROyBlRfZr5zT980eyPqiAayEw rsma5lfPT6uiLNjjhJD5BouRlEUcTBVnWzxs4Dba6/j2bosdjlm3RK7y7xeTwCsJ1hd8 /554oj7UjqgSK0KuxS8UEwNy34h7E4qwAocvQgUTaXrsz90baaFK2mh6qp8J8Tw8eUtH vamA== 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=ivlidNzmtHVsIOTYvoS9nSrHCQS86Rd2WoiQT/1OxqY=; b=yrJU+Pgmbw40x866122rQhHVTHnWooRKMTv7Q9jcb8T8Hiha2TDoVVySKHPkXjE5V/ QGOJnkZCrOXk0JhK8mJUGXjCjLsqUOuzsS0WMmgRcnoKxHwuCrejBhRIIcBP0Rd2SITF zIUCyEzSeIN8qu26pOrA0Zyg5kV+HDA7+zatgJrUtUxFPKU/3WzgOSyQ6BtKfG5vYRoP YR9zUATCpneFlkbToTfARu6NrBhtwClpRXdS5JFxl1fN0H2QesKrnr30Avu0SutQ67HV m7bLAxO3nTVCQF8hNDJvZTLQRftM6XxIQ1mPeqdNdP8uTvznEYwqz9m8viBbYR5iqtj/ udfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=l4Mrqj8z; 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 v26si19024789ejg.723.2020.12.28.05.06.47; Mon, 28 Dec 2020 05:07:10 -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=l4Mrqj8z; 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 S1730400AbgL1NER (ORCPT + 99 others); Mon, 28 Dec 2020 08:04:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:60070 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730306AbgL1NDx (ORCPT ); Mon, 28 Dec 2020 08:03:53 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D277421D94; Mon, 28 Dec 2020 13:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160593; bh=Q8Jma1sP/c+EfQWsNXNfmNNGb0Xk9HnEbDSWPklweC8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l4Mrqj8zIxLLRMjCCEJDNEGIgU/fJ/3PphKHFFxv+oh71LccZeJUqcb/JJgIMAllo r0MCcEssk52GsFvo6jsOcHChm5im32qJ6a09F0Jm37fP3TyXCMxmlEEMrlS80uzBjG GiXHE292WjmsnpYQejYmvJRdSY0li68eZzzcZsg8= 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.9 104/175] scsi: fnic: Fix error return code in fnic_probe() Date: Mon, 28 Dec 2020 13:49:17 +0100 Message-Id: <20201228124858.290905049@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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 58ce9020d69c5..389c13e1c9788 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c @@ -735,6 +735,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