Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3428738pxf; Mon, 29 Mar 2021 01:50:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnh9DTP40nIe7XAQ87xDW3YDtWkKuJIV7ho2AOy7RKJvTW9PwmCE88ZLNB/NQx+rpCS+UT X-Received: by 2002:a17:907:3f26:: with SMTP id hq38mr27594271ejc.374.1617007851360; Mon, 29 Mar 2021 01:50:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617007851; cv=none; d=google.com; s=arc-20160816; b=Xtxt8gY73u+Fk+1CIJ0W6kP0XVGAv6SkDji5rVhnwVbUvoPOV/Ahz7NM4xWAadePeQ vJI+YBSXWbf2W1xm2/0CEz3Yl/e2IDISAoMTYeExV8G/0gCWMtpwIw/kDfk15BfmMaTt 3pBM4XCtjoykPF4Z2ev136sFbMrFWhYGBQfn2rrwgNdLurAYmx9tM5ljYSYVjWNOnAYn EaigOZwq1diITYnnvWpXtXDLC7Mvw/IQ9jGo5vC+jplYTlgpzkqm3T4473U7dMtSCEdh pdE+CxG91x3e+h07r9X4LFF957KjpWuB3kLPZmsH07EcdDyoSkX82C4Gy3LBEZDlSUci JhdA== 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=UlHFaQBlQHbyzU8k8RWLEOUx4ZlgzztZ7W5CVZ+O4JY=; b=uWkJQDfcgpjW9j78tnPJNQwIUOgMJsFavyDt746buFMhkfDjx5ZJtghlWw7dvRGYpp EJ5xdZ9AXYkNBEoEEMONhvleCrsE6ozl622sKJJlUvW/wEUXvB/MJKXV8zlft5vYjhYs bEsjncqgMa2ecn1Dtdcbo8507LdeWBZEzjkcwGUGxzYWVuLIW2j58iK+czzdrRhznBm+ GlkatdyjHV9hsPQqHTnpCJimK6PZT0fRt0JXqa9KJ3cvVXR29o4kF22LF1K5dqZ3PIT/ /+wJ20gVHDlJJv3gbrldU9GdjG03/xrCofVPKrwZTa92Nx5k4ysCQ0s4jjv1uooN5Ip4 71OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Skf1Hu+R; 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 b17si13086633edd.117.2021.03.29.01.50.28; Mon, 29 Mar 2021 01:50:51 -0700 (PDT) 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=Skf1Hu+R; 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 S235662AbhC2IrZ (ORCPT + 99 others); Mon, 29 Mar 2021 04:47:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:42762 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233688AbhC2IZ7 (ORCPT ); Mon, 29 Mar 2021 04:25:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4CA1861878; Mon, 29 Mar 2021 08:25:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617006334; bh=QOUW87uWxMBntefa3uSDuN21MjIs34smbi4ec75Cq/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Skf1Hu+RcqOJtea5SQN2cIjk/rYhEYBLyno2l2wNxXSAWGH8a5QyqmYYJsY1ARG1f JfofuO+IcyWo37KVh3XWiqnwCP5Gnd/NwAfW+DIXen5t/fY3Zj0Kob65vsaCLUgPDF SjeaAFLD+lNbGwdGLOOBb+jQWpT+rsVFtiv0fnqk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, TOTE Robot , Manish Rangankar , Jia-Ju Bai , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.10 203/221] scsi: qedi: Fix error return code of qedi_alloc_global_queues() Date: Mon, 29 Mar 2021 09:58:54 +0200 Message-Id: <20210329075635.893051551@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@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: Jia-Ju Bai [ Upstream commit f69953837ca5d98aa983a138dc0b90a411e9c763 ] When kzalloc() returns NULL to qedi->global_queues[i], no error return code of qedi_alloc_global_queues() is assigned. To fix this bug, status is assigned with -ENOMEM in this case. Link: https://lore.kernel.org/r/20210308033024.27147-1-baijiaju1990@gmail.com Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.") Reported-by: TOTE Robot Acked-by: Manish Rangankar Signed-off-by: Jia-Ju Bai Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/qedi/qedi_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index 47ad64b06623..69c5b5ee2169 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -1675,6 +1675,7 @@ static int qedi_alloc_global_queues(struct qedi_ctx *qedi) if (!qedi->global_queues[i]) { QEDI_ERR(&qedi->dbg_ctx, "Unable to allocation global queue %d.\n", i); + status = -ENOMEM; goto mem_alloc_failure; } -- 2.30.1