Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp683806ybv; Thu, 13 Feb 2020 07:43:13 -0800 (PST) X-Google-Smtp-Source: APXvYqyOeKjzh0AMppc3m6nMoKgZo4iSO2hz+9cBiVZjW0KhGPH+XNt05qHWJ2u8PaTXhTymeXc+ X-Received: by 2002:a9d:6b84:: with SMTP id b4mr14030083otq.190.1581608592988; Thu, 13 Feb 2020 07:43:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581608592; cv=none; d=google.com; s=arc-20160816; b=Uib6M7r26uUPedm6IrpZGIiyrxNHFhQPHoK8bUHyjtULhrbWWSIxEl9T6+srPmChAA rlNx1xfkRNbshX4Z8UYQK17ITT4XHhGQL0/INH1ZvaZq8WB4WzPmYvGKuuHBGJvOjf6Y 0zGXnT4XNqRfVLwIwUxM4HD4s+GpSNLP0Yi2VlHUOddIj/ZBpQRkAg6IKBRHZMN/wqnM I45+0Jn4vh+ZHRMCCFiypgDk4mYvhAblS5FAzzvARQpcj/68w3OeII7VXylqWPoWOTiZ q7S3ONOM5S8QlSN6VDROl3nMZ6nh4E8Tkmv9XIxKuBJbFTbR1GaYh6sLzAqOt5CzJLXX 4Skw== 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=h/v4Z6Cz0iagIgbbMaDDcsjUjpV++IJuyZyASC3JoZc=; b=ifoxyRmpO1kBj+xK7/4eDT0puYIcstDKrl4VpbGHLVBAZwis7yfcUeGQXUWqmQ7cSN wKWtfGzeUzkToURvg2nV5CyGR/op6eWx9sp4ni5oMVVJqVWW2J2rdRZ72KueQET5jMVP 7Uz1zz9kfdqDbiNsZE/FVTTPNwXg1LIMbDgLqZJuPTej+y9p/vpxqX+cLjpEz7dq4miv krBf8sUXuUFxMLXm/DEg5Z525mfc+F9Vp5AqJuSZg7KjzeivirWCrtK4ZBGBbuVooIYB 53xCElhY2d8JXUvqHwB0Q/FSeZn/YmUDKwuN/00Quj5Tyu59YL897ahD7CK1AZz3A+gh qD+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mFJEEVqO; 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 h9si1257169otb.49.2020.02.13.07.43.00; Thu, 13 Feb 2020 07:43:12 -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=mFJEEVqO; 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 S2387514AbgBMPm5 (ORCPT + 99 others); Thu, 13 Feb 2020 10:42:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:54316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729553AbgBMP2G (ORCPT ); Thu, 13 Feb 2020 10:28:06 -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 1170E24671; Thu, 13 Feb 2020 15:28:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581607686; bh=ljblTdtXxx08TdZR2KauMkb4yiErJI/zfrPYRupG6GM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mFJEEVqOkSsLnFiPaZxxooEankjEOCPcas2Vw7lHxKYmH4Za5/kpmwRvmgF2Mx/BC y5c+yBoFJXrH1ZcX4suq2ux5XVKtGJ/1h58oi4HcEukdxB5tIcmOLqKycd5EtPzI4B gBUzQFAei+vRaXKTdeDbDiBxXTAuhcJTfYhFpNGw= 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.5 013/120] scsi: ufs: Fix ufshcd_probe_hba() reture value in case ufshcd_scsi_add_wlus() fails Date: Thu, 13 Feb 2020 07:20:09 -0800 Message-Id: <20200213151906.209600883@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200213151901.039700531@linuxfoundation.org> References: <20200213151901.039700531@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 @@ -7030,7 +7030,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 */