Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp874321pxk; Thu, 17 Sep 2020 19:58:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXGFzV6C8Zt7tDd8UU3qks9JhxuEfmD/OSz/WLYYoIweyMsxnKS6bOEEhQaSF3xheY9xjD X-Received: by 2002:a17:906:3494:: with SMTP id g20mr33764946ejb.486.1600397923382; Thu, 17 Sep 2020 19:58:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600397923; cv=none; d=google.com; s=arc-20160816; b=uzWQJitrQs4+DJvlPy2rLiPMcas5R+G0lVD2kQL++4n3+9dlAa2/AOApkUe7gLH5P3 VmnRBDOA1HbrYvlU/EGTrnE0HaBZqZRjV7Cokq9KOMmQjvTVMqtb3RiLAnHkRBolW91z 9RTnhGudJBfAv1wGdUqdoWP083XdGxhl4LniCIH2NKVS29eqEFA7W+NMfb7W11y7MFi4 EhmbftWaZIuftT+R267NdsbzLtZxTGzeec0vmxuHhh5AYPjnPAalA9dhFIGaFxFHm0I6 xUmLIj8hK4+wJGaCmvcttF5KqIl9eAxzorDYYQc/+y3FCnNbKQAX3EDVAbkqiDHl+0zC +RDg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eX7eyccL+DrcB4sraC4cJ/asl67qJxCen5QxniZG/68=; b=HXciIyXvljh2oqPACVtHiKUmIN3U71aTzQ4jqwCTAwPNjQ0zoq54kZdB66LigviRvz ruKru+/1EOaQYpfnIB+bAeEd2BBANZ54VPjswxzmA/DwlkmM2tXA6Ez0E1uc1p2ghHOh qvX4GnhNTdQIKqvi2lohI2IE7MP5irNBU7maCpYRn6ltE2qRiGV+9iuEm1Fhi+MtMMVC MH3RcEx5fBrwzB0ozoqEmEh9kn1netHQs8DYzAUfTCYtPQoY0xnOxJCnIcr/F3sbM+dX 5jnQuUfgV77/1rddW0Crl4BOiaWYZjW7DDLdd2pMW5hHdN4XgWWpdD/kEVIjNV1rWOq0 UsWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ap72OSeI; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k6si1207327edr.111.2020.09.17.19.58.19; Thu, 17 Sep 2020 19:58:43 -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=@kernel.org header.s=default header.b=ap72OSeI; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730374AbgIRC4e (ORCPT + 99 others); Thu, 17 Sep 2020 22:56:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:57124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726925AbgIRCHF (ORCPT ); Thu, 17 Sep 2020 22:07:05 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF454238E6; Fri, 18 Sep 2020 02:06:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394809; bh=ixzpbqLb4xocEfRBNC7ZiSrrGa/FbibEd/KqN8FpI8Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ap72OSeIz0WbzUgl+Z60m1skAI2lTH6zu9KjGTAl0zUjtcPchJOt0LyRthlJkmEo5 fL/in4QHIiWkt3fZkh5uj4v+uobt0LkOJqI5dzfrW8+LgB4nq+tVs/JwFT+2gXWsRA 82yUkSr5h7qZcTNiqJAzUo3A5tshX8kZWMRtr67o= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wei Yongjun , "Matthew R . Ochs" , "Martin K . Petersen" , Sasha Levin , linux-scsi@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 277/330] scsi: cxlflash: Fix error return code in cxlflash_probe() Date: Thu, 17 Sep 2020 22:00:17 -0400 Message-Id: <20200918020110.2063155-277-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Yongjun [ Upstream commit d0b1e4a638d670a09f42017a3e567dc846931ba8 ] Fix to return negative error code -ENOMEM from create_afu error handling case instead of 0, as done elsewhere in this function. Link: https://lore.kernel.org/r/20200428141855.88704-1-weiyongjun1@huawei.com Acked-by: Matthew R. Ochs Signed-off-by: Wei Yongjun Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/cxlflash/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index 93ef97af22df4..67d681c53c295 100644 --- a/drivers/scsi/cxlflash/main.c +++ b/drivers/scsi/cxlflash/main.c @@ -3746,6 +3746,7 @@ static int cxlflash_probe(struct pci_dev *pdev, cfg->afu_cookie = cfg->ops->create_afu(pdev); if (unlikely(!cfg->afu_cookie)) { dev_err(dev, "%s: create_afu failed\n", __func__); + rc = -ENOMEM; goto out_remove; } -- 2.25.1