Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp688612ybv; Thu, 13 Feb 2020 07:48:13 -0800 (PST) X-Google-Smtp-Source: APXvYqzuRJKzjrkvKuGLVcnyqqn5khy+iSoMx2LxlS9wCsN1EgUT+8/DNEg+DwUKZlT2vqStgMGT X-Received: by 2002:a9d:6290:: with SMTP id x16mr13297955otk.343.1581608893549; Thu, 13 Feb 2020 07:48:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581608893; cv=none; d=google.com; s=arc-20160816; b=zplwQul2+DcyKR2kzO7EDKr45W1XLDsPWDTXN9SI7n8jefMYz48XW/2ykMPP48OS3M IsouftbgwrhLQCQceKTWpNtrLj/BkIoaOGEsPo50rNdV8FNfytEHu1OL5UFX6zQjmIE9 TPSOia00xsaV6snsKHHxT8hFuBQD343+9CkE0uK3Fkhzu++xHlFMTRKx/JvPVZKJE6kw eaB6fEqlKCqVRrq4zOESqCqUTIchtMb2yEyg9kCyenSaItWTXOmSPdtPvHJx6Rpq/P+V l9ZbhyCaWb19YpL/95QfDZFPOckJ26OH9ZeXa7G+8T2qqDzfXufMFIDtqIZA0K3EIg2W wCJg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=URHmyEG257CV6Ee+bnw620jPokuX2av7X/zz55GyY/4=; b=keKB4L2u5OI3huLPjRhc84IsOb8Fa7TMwKk2IeMuZFLc7M642N6J7pizxQ6hHCT3jN 6JC5Wj41YjdKu815LHc22LTQy3dJ/j+ajhaH5SRaAQw1R5VXRMJ3a+7wSkwXbmvIHQj4 ofa2DeTCNIfBv1VtZQzU5u4JkaM58jQTYshLBI4n6RUlxH15xMATyK0B+x2GhoTY9edr 762KMvVNiNESwP9H9yWx2PyiY8SlcJkH8t7KgeC5rWyqrIlifqwNv+pB9nIKMAeRD6nZ 6kE3IlVFQQvGwvUDaSZyNDA/NttnXrHjrL18ScJ9HrGlTDnrkxNUUqa/kG9c/6FXzId6 Df0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eiIUtJzu; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h18si1273935otj.114.2020.02.13.07.47.59; Thu, 13 Feb 2020 07:48:13 -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=eiIUtJzu; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387721AbgBMPrz (ORCPT + 99 others); Thu, 13 Feb 2020 10:47:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:48024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729309AbgBMP07 (ORCPT ); Thu, 13 Feb 2020 10:26:59 -0500 Received: from localhost (unknown [104.132.1.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BFB0D20661; Thu, 13 Feb 2020 15:26:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581607618; bh=Pm+Mw0+GOmvlozoTcCID/HKqOQ0CXLV9Qfa6XUztFXI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eiIUtJzuv01y8gIp9MgUvFErqh+BU3/zTo+wUkjz8gep8qv3M7QWcoMDhF0LnhdYT tqSGjnVfV8Mbj4S381ipMyQ1NTghMnyhXfiIJZF3JaIVhVc+qTy5ple0r+U0kY7+al B5c+DozrrQ4Cs3cvt+UPMIEDkkPmzFQLSJJqHV6I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Asutosh Das , Alim Akhtar , Stanley Chu , Bean Huo , "Martin K. Petersen" Subject: [PATCH 5.4 12/96] scsi: ufs: Fix ufshcd_probe_hba() reture value in case ufshcd_scsi_add_wlus() fails Date: Thu, 13 Feb 2020 07:20:19 -0800 Message-Id: <20200213151843.859773749@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200213151839.156309910@linuxfoundation.org> References: <20200213151839.156309910@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 commit b9fc5320212efdfb4e08b825aaa007815fd11d16 upstream. 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: Greg Kroah-Hartman --- drivers/scsi/ufs/ufshcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -6953,7 +6953,8 @@ static int ufshcd_probe_hba(struct ufs_h 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; /* Initialize devfreq after UFS device is detected */