Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3528613pxf; Mon, 15 Mar 2021 11:34:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzW5bW9yVbLu5MJO2n6PsambhZYkyglowUUxhUSvhaXm0q/i3qqDIxoA5By4IJ3Dmcxhbta X-Received: by 2002:a05:6402:31b7:: with SMTP id dj23mr31977837edb.245.1615833255925; Mon, 15 Mar 2021 11:34:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615833255; cv=none; d=google.com; s=arc-20160816; b=ne+sKrh4z4A4sLvAEx/sCFjHVRaGdz7l2wXyDOSHhGcL787Akt08rBydIM3y4h/ZvS LsGZjpZkalRIkwtXw0/DLhl5/YKHOBXpj9uQ/yRvIYhI6c7vByeu/zudd9e9nqnDBccv /bzc10fjqS+JjfFqHoJ5sL2h36CFxrAw0DB/WBQup9mLuvL0ijPC85IfYf9AOnninTRe uTrTZEkCfSQjpfALnjKgfOC2TwEIx/UN/hrZtBNsnWTw2NsTwz/d9Ep+zS+FmfiKjnmJ f89Yvav43/daQJSRs4tGR6aRx/icb9lMlpk+jKb+iCX0VUnLUR5bCcL/uR0SLZQLzD9D OQnw== 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=tB4CLDe8+6tnc0lbx91//JsPcYAkUCGX9H3KCri9wHI=; b=W3425fH+8l3aHFLGXFTip/gQp8rlGnqSczns0f5s8CWOeEsJFKXHcWtRQLfhdKhfWX ElsWgcIejOctWiZpHCLyjkX64N0p6lzRypAjUF/7LanIxTeIEcWy7Gbx7jKEGm7hKhXd 3iBeI2HC2PTc3AgXzdE4S7PycQAiKklcVCxoKOKYb0FJmZ2Igrdx87XcYJ2Q1xzKpODj hfmbXmnMdPjskPvqkzqW2EmxK+aZAIVC5CI98vX8Ckkx99Nj6b1OgkmavNGg9tKBrX3T iRSNr3D3472jOcptTyslga1RLLrfNF7QciYzRd3CjPjlUbA1OQ/F2sSZwb8zNG8wCYmx ifDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e5m4v34G; 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 mj17si10773081ejb.28.2021.03.15.11.33.53; Mon, 15 Mar 2021 11:34:15 -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=e5m4v34G; 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 S238517AbhCOOmk (ORCPT + 99 others); Mon, 15 Mar 2021 10:42:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:49608 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234324AbhCOODO (ORCPT ); Mon, 15 Mar 2021 10:03:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4ED6E64E89; Mon, 15 Mar 2021 14:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816993; bh=57FeWDPrnbzJ/BZk84N/U//XUkDGiItnYuBeJKwqHtI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e5m4v34GP2wVQ+TOCyHKbPKvlkn0Kc9CkratzJB2Pnp4+Fn96ghn6eX1Lv+ySUfjc IHryePOtoWtZPLleRmyhHKJ6kZg2L3slwSBeHdwm8BIyD8OjZcPvSK60SWQPEw1yJa fp5mI4hNe7GviItExz/QaemqxkwORMaX7yBGGmu0= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, TOTE Robot , Jia-Ju Bai , Jens Axboe , Sasha Levin Subject: [PATCH 5.11 249/306] block: rsxx: fix error return code of rsxx_pci_probe() Date: Mon, 15 Mar 2021 14:55:12 +0100 Message-Id: <20210315135516.058691074@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@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: Greg Kroah-Hartman From: Jia-Ju Bai [ Upstream commit df66617bfe87487190a60783d26175b65d2502ce ] When create_singlethread_workqueue returns NULL to card->event_wq, no error return code of rsxx_pci_probe() is assigned. To fix this bug, st is assigned with -ENOMEM in this case. Fixes: 8722ff8cdbfa ("block: IBM RamSan 70/80 device driver") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Link: https://lore.kernel.org/r/20210310033017.4023-1-baijiaju1990@gmail.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- drivers/block/rsxx/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c index 5ac1881396af..227e1be4c6f9 100644 --- a/drivers/block/rsxx/core.c +++ b/drivers/block/rsxx/core.c @@ -871,6 +871,7 @@ static int rsxx_pci_probe(struct pci_dev *dev, card->event_wq = create_singlethread_workqueue(DRIVER_NAME"_event"); if (!card->event_wq) { dev_err(CARD_TO_DEV(card), "Failed card event setup.\n"); + st = -ENOMEM; goto failed_event_handler; } -- 2.30.1