Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3529115pxf; Mon, 15 Mar 2021 11:34:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8lts+BTpJiSILKvgLzMs1MlHUomsnlhAJ+/iSPr9UdUXRmvRe3FHBRmrYvhQ/79slJT0f X-Received: by 2002:a05:6402:27d4:: with SMTP id c20mr31950142ede.271.1615833299100; Mon, 15 Mar 2021 11:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615833299; cv=none; d=google.com; s=arc-20160816; b=k9epCISuTylUF4JGPUtjz+v20Ne8aJY/ko8SMchxlTn+/cijAOyTklGshwol9gVVCx sW6sETzMjelzZahK2Kwz+KpgJruzan42AoF9djuSxQVyGtBLTMwdCC06jXJdtZL0To6f NrJo2FZN4W4khIa5KqE9rOd2EX5dbb4ueZZ6XxTvZdx+hlnN4H9K375BFXzIqtRbpxUn Co8Rgz+Y6e3s5+GsXQDT7ULgc2Oby64U1/uK3oPOh+DGZ/fXU/hQvOOO5fVphDZ5bV4O WuO52oFVVIkpZnPFH/gHNIwR21gjOoRlboUclPqvJ/p+GWEe7DlsQ2BEHw5vwBwoyNIN AUDQ== 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=T9ubP3595UrhazH0rFA5GRr3rknsoGCIja4x6nOppjbLy0j6+LBo2JPRDUQiW011CG yRpsKS/KIx54Jb7owE33hKrQQ3GZceSr7Di6cnbwvQZCtgq6LBkza1L6+LUbrooOnngE 7pK6Tj1qivqW6Ln+O0573DwB+pgzvbpqvnGxWjU26p+/vufEXQ4sV/gj9kewbdClw8Ci LXHfFecNLsBCWd8h5IlBs+Jb97RGVfy/HH+7E+7FXMiEGAHq8p/NlyyMXaOWKju+YDA+ YwCnfXmP5caB2ndOBLnXgfTFXMxwhZOGfTtLQc51zbma1rbkNjZcS+A3pF2H7cbPJXCK sV6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dP+7pj5+; 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 co21si11942588edb.513.2021.03.15.11.34.36; Mon, 15 Mar 2021 11:34:59 -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=dP+7pj5+; 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 S237986AbhCOOoF (ORCPT + 99 others); Mon, 15 Mar 2021 10:44:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:50058 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234480AbhCOODj (ORCPT ); Mon, 15 Mar 2021 10:03:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4746264EED; Mon, 15 Mar 2021 14:03:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615817018; bh=57FeWDPrnbzJ/BZk84N/U//XUkDGiItnYuBeJKwqHtI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dP+7pj5+6boLchZEQj3N2j9cU/KrEMqN0FLS7Z2hauaMWkz0yG9p9VX6ab2Jc2yvO rTVGCmFMJb8ivh/s+hl2XOR67DCEMIfB+9NcqA1+IAJOnzTJD8ki6335SE75Vu6dvU eDry/IDbSMgjpE7oWyVa8BqqT3WJnBaeK6AXcGlY= 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.10 249/290] block: rsxx: fix error return code of rsxx_pci_probe() Date: Mon, 15 Mar 2021 14:55:42 +0100 Message-Id: <20210315135550.430688154@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@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