Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3524420pxf; Mon, 15 Mar 2021 11:28:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4J+G0qIAK4PzGK4zU0OBGoUwa+hfuOkJzMtJtKEvkEBm5tEM9CGudpEiiYZ/jTpH9ptpq X-Received: by 2002:aa7:c983:: with SMTP id c3mr31563593edt.185.1615832920240; Mon, 15 Mar 2021 11:28:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832920; cv=none; d=google.com; s=arc-20160816; b=GXYAV0Yefd3Nrh0+ZyiFYY0fwnpq9qZPHsweE2J2zFos8IxuQZ7aaCeFkIARFZpkRP 9Ok2ajAo7uENY7jcH8mPFT72XJIwJJfNd0pI5098QpamO8Jy3vKXUScYuc9gfPUVsb1d A9wHZZgQJHMCIKiM+SLskAIrRjbrXee083rB91BEIjEDXADwazV+mH0cYPGnadQRXLrF wL3d/Xt3HJpH4qUskDIegoVrnpPTnJGb2kOWYHJrXJUeHB5VjsVfDdUqazrL8zFsDkFb jh8Flmt7RBsEav0Dvy0JOaNi2rRlhTvRElLrU9zZQ3ONZ//5TIq6D57RJ19gzh/fQRrK 9xKw== 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=yFviHS0ISLV9NwFDoq3/0LouoDydDk8s9047l8s/QhQ=; b=DdZDAuKY31N7tFrWspDDDF9wBZ5TkCnLALNCIaI92952QwIXtUJT6e7nmnZfxYpW/e Mi/zfRNeKRDTFXQNmUVY7Vevkker+tcC8D7HZcDc6fZ4sGhWwuuzCvpWV+pulPJX3SAB rzgFAUP4mZKds6Zos9/j3+W+XOiIhzFtlIJ0of0V8BfDYL30tYGOXWLMTC5s7ejTWIpN zMQJX6kWQFFxVEfmap6hQK0fYCJ3llJP4qM1hFCwlSWNHzCgEf4/6XOKpb0i+Lwwl19G l5EpPU6BxUvd3a5ZWW9FeirGCRtd7pvJHr3O4ku/77+0dtHJZksi9OobLySUSFXAiW0z lYUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DI0epbti; 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 t17si11899836ejx.576.2021.03.15.11.28.10; Mon, 15 Mar 2021 11:28:40 -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=DI0epbti; 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 S235662AbhCOOb7 (ORCPT + 99 others); Mon, 15 Mar 2021 10:31:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:37836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233217AbhCOOBL (ORCPT ); Mon, 15 Mar 2021 10:01:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 17CA364F23; Mon, 15 Mar 2021 14:00:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816845; bh=e+biyl84nGKnbtngIlTFtk/yIT2OJU8s+xalLhPS010=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DI0epbtiJyGSYlOizi1JUJaEZo4RZ5WCZ5QdbZZlYlGaJ6jA+MFs7ueEhAyLV9bF/ o+7TEwdxg+6MiACvAsKcxVs7YU9xgzvGEQMa9Tswwr8mq3jyp1jY4q79TnmsnTEn4C lQR26ejq9S4cs/gyvc4+odNRAIk1I8RFKpB61luc= 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.4 149/168] block: rsxx: fix error return code of rsxx_pci_probe() Date: Mon, 15 Mar 2021 14:56:21 +0100 Message-Id: <20210315135555.236979509@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135550.333963635@linuxfoundation.org> References: <20210315135550.333963635@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 804d28faa97b..a1824bb08044 100644 --- a/drivers/block/rsxx/core.c +++ b/drivers/block/rsxx/core.c @@ -869,6 +869,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