Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1930581ybv; Fri, 14 Feb 2020 08:25:11 -0800 (PST) X-Google-Smtp-Source: APXvYqyaO7P6R/85HCEJjiBBMYyRdFTfl841Fw42g6EJtKotLde+rrkGq04aRvu0AdP58R06+FV0 X-Received: by 2002:a05:6830:95:: with SMTP id a21mr2925672oto.171.1581697511404; Fri, 14 Feb 2020 08:25:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581697511; cv=none; d=google.com; s=arc-20160816; b=kU74DdpkeQ3WYz8rHnYSPugbXrQ86MpG18lD+TJCPp2ogSaXsl7JplL+EGIWeAM3RV 5UqYdW2o7758qIeiNRicpqdaK8mO5Rt264cdKHfI6ht1bCyrp52NHrr6RqSPdw9tTMQ1 wYaHGQhxS8SGI2z887E9dLJ6l7KNtqD9GX4T71qOkvo/K1hWN6Pb6C16rzZ1arUgZDMb CuAdDnzRk1Qkz8B3G4wpHWXDMC+1As2fHyzy4J1PLSusJgGeqhaxsAJ7BzAcEsA3K4oO G7Ha91MdiEWEQbu18dlX30ZvwibweJd3wb7DIgytyd4LcXuiNqP/LGo/bgog5UGAwFUw 7s7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RSbbKTSBC3Z6iMRs9/JuglV89gsZHK15aqKiuTf/CKM=; b=koQHDn+pW4IxQM8JR1+aUgmR6I53sVORANGt+nYBBk8IiibPEObjwNBOm3FNHcaezx P69JGh2xIlELZ5DgNGyfck2XgU08kpm7sKmCusGBEoZB7EN/L0HGYmpIXiK1sOroYVvW k+nHh7UAZztkYYihN7Eik0cvPFkIMjEc6Ek/s7/kSVU+cknH8n0mHBcXMnaJXVTinHrt JNEAp1/9B0Vm9yyk0Gx0ZSOUyX4/LCoVNSpUwu7jTYSIFZjUL9dbNxfkVxdgDqOQ0hCC Z+901APLV6By7v8N2smuY126bL9gis3wZIOr2yCtgmyC6K4VPm7fX8fonVWaMJ8lBhMo Qjlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=P9sTUIwW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id t1si2951439otq.148.2020.02.14.08.24.59; Fri, 14 Feb 2020 08:25:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=P9sTUIwW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2405622AbgBNQX1 (ORCPT + 99 others); Fri, 14 Feb 2020 11:23:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:56842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393123AbgBNQVy (ORCPT ); Fri, 14 Feb 2020 11:21:54 -0500 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 5141A246B8; Fri, 14 Feb 2020 16:21:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581697313; bh=qekGi7wU7YSQhUWkPVpoPPNnb+45FMbtrtnohbHSl10=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P9sTUIwW4hprUN7Qsg7a4Cm+oQ5Q+vT7TWiUatm0ZijXfYA5XZS3G6GVOnXNip8yh CfPTEUugBaIUeShiSR1cqHpsdZAUd2O+0PRL5bP1Z11rEDTF/vOXWXWunBzeTgg9KS dQ95768XB6BoPWtqjDyPJ0bBUW9JWX5RMhbevOuA= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Bean Huo , Asutosh Das , Alim Akhtar , Stanley Chu , "Martin K . Petersen" , Sasha Levin , linux-scsi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH AUTOSEL 4.9 024/141] scsi: ufs: Fix ufshcd_probe_hba() reture value in case ufshcd_scsi_add_wlus() fails Date: Fri, 14 Feb 2020 11:19:24 -0500 Message-Id: <20200214162122.19794-24-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200214162122.19794-1-sashal@kernel.org> References: <20200214162122.19794-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bean Huo [ Upstream commit b9fc5320212efdfb4e08b825aaa007815fd11d16 ] A non-zero error value likely being returned by ufshcd_scsi_add_wlus() in case of failure of adding the WLs, but ufshcd_probe_hba() doesn't use this value, and doesn't report this failure to upper caller. This patch is to fix this issue. Fixes: 2a8fa600445c ("ufs: manually add well known logical units") Link: https://lore.kernel.org/r/20200120130820.1737-2-huobean@gmail.com Reviewed-by: Asutosh Das Reviewed-by: Alim Akhtar Reviewed-by: Stanley Chu Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/ufs/ufshcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 094e879af1213..394df57894e6b 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -5347,7 +5347,8 @@ static int ufshcd_probe_hba(struct ufs_hba *hba) ufshcd_init_icc_levels(hba); /* Add required well known logical units to scsi mid layer */ - if (ufshcd_scsi_add_wlus(hba)) + ret = ufshcd_scsi_add_wlus(hba); + if (ret) goto out; scsi_scan_host(hba->host); -- 2.20.1