Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2160642rdb; Thu, 7 Dec 2023 22:59:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IGTet2bLeQldU85skxRt5+98GMTajOggezGaRiDI537UGZiZOOl97/xQ2SCKv6Pfg/QiYiV X-Received: by 2002:a05:6a21:3296:b0:18f:97c:5b87 with SMTP id yt22-20020a056a21329600b0018f097c5b87mr3384039pzb.85.1702018794355; Thu, 07 Dec 2023 22:59:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702018794; cv=none; d=google.com; s=arc-20160816; b=gse+AUQG+K+41O9bjF++8PY3mmijff80QE+Nex0XsjZOWVdtw1QKThgsUBtYWtA4HO lh9rOaU5Svnu40O1ZSo6pLpLUHmpscPJt9xWGbkaY1Kola7fn1Hnfw7xyHvz4vMdyZ5R ZVYUvyUAixjF6C/CgKe6nJ0ccc9uFR3GVsM4YaTSuz9TWpyIcZgbxojdR5CeK65PC5iI a6IvdFhyo7WQxEcwYjyd1sXyHnEi6gHdQ69HzgVWPvYIk46L3XwmhAxWi66cMYzi+KG0 JR//+GUXgqchMPQoWJGPS4qhPGbG7PPqXB/MiJLGfxsgNvhlIQed1t0L/9fiH53mLgJf bRMg== 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=rAuafsSJin/545S9JBl3k3169/mG+pk906+BZqM02rw=; fh=3M/8bTCRB16Lsc02X7bSCpILCqUt5UU6Z9lIcVlF+qQ=; b=we7c22g83fMNxhkV6J5RRI1xlxKS8G+J1lSF1ST5rgynN+NJ3W3shsiFxqYFPF6co+ G04nDjeFDhSlnpsA0cVjljX/fxHsaOHdKtLflUiSbH4PEo/+O95JjP7KuoHDDRSusolT /+N40F9jqw6A1VBAs3p91UDSfXcLvKtRHVBt2d25f4lshReY9VLnosQ1zr6RMPyD5o7v 40fYq2xfCUlui+epVoROttZT+kb8nhRdU6W3g33rNsclmYiP7ZuDpoHZxi0jX+UWwdva 9nbfUhSGHmiwQbFUlwgA916++JnSYj7nolAhni5/JqaMjy2epV/U2v8+dEUE5nK/dw0e 5R/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LRDPeH5c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id i19-20020a170902eb5300b001d2eca39503si691127pli.489.2023.12.07.22.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 22:59:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LRDPeH5c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id C27B281067B7; Thu, 7 Dec 2023 22:59:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233243AbjLHG7e (ORCPT + 99 others); Fri, 8 Dec 2023 01:59:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233340AbjLHG7b (ORCPT ); Fri, 8 Dec 2023 01:59:31 -0500 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDB0B198E for ; Thu, 7 Dec 2023 22:59:31 -0800 (PST) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1d2f1cecf89so206895ad.1 for ; Thu, 07 Dec 2023 22:59:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702018771; x=1702623571; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rAuafsSJin/545S9JBl3k3169/mG+pk906+BZqM02rw=; b=LRDPeH5c3X1gTwXbBsyhAE/Qfkm2in7DS7OWrRZlWbwmq2SiHtQj8ogscfsNPh7on/ Yf385E5UGVZYYBDjkL793HhhuPofS7TvBDFsu49/F0JLVPrvBlNkppRg/iUi6fhxxt8M ULYMLrGQIYAOKgkoki617P1KFpo5XYEqMC51lWtIoin+xVQWWhDpckFkmnLxcF+MGYUl /WpSGoI5AhsIo3MDOP4y2CiatZVzJ2alhoavN5CUw5IRKPoeKgKapzcM9HVFFjBxepnp XLuHItg1WOE9NakN2u5GaapYffw7YczLfray0h29Y3efzJ3zzhqNg9Ou4ixQLh9viXKJ Bk9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702018771; x=1702623571; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rAuafsSJin/545S9JBl3k3169/mG+pk906+BZqM02rw=; b=YpeGR7O6fmWoJ2UfYuL7n222ax0yHWGO4QJSY5VW8H6MaQ5FkL24XCJFvzSquvgaVO K+czv2ehz1GhTaALvyFUbR4aSYZFmOvElzwO1TDNXtYB4t169381e+zwCskudPqayEIH s4bZJoL9R+MeYN0RRUBC6keV0JY3U59EeSqR6pFNqXaenzC9eQWeSjZM8QtVGPcNRgBU k160LUMFXAVhgXSj2zIHg4c+vY4/eRbfW7sEAak1lD5yCCVD8FF8vTca1VxBbr739cxY /yzQz4/pJaDU7kCskt7tzOHMtK0GXr5W4HDWT9+rbEYeR9WYwjlW6t/bLvCc8nHXe2W6 9Zxw== X-Gm-Message-State: AOJu0YzoZKXIKgDVCIMyqJnUVTDSatvrxt7ArT5eOwRoS8kNBV/pBjEF PCsWqzB8qmVDE/5ors6KXUbD X-Received: by 2002:a17:903:228b:b0:1d0:5878:d4f4 with SMTP id b11-20020a170903228b00b001d05878d4f4mr3198154plh.5.1702018771023; Thu, 07 Dec 2023 22:59:31 -0800 (PST) Received: from localhost.localdomain ([117.216.123.142]) by smtp.gmail.com with ESMTPSA id n8-20020a170902e54800b001b03f208323sm934263plf.64.2023.12.07.22.59.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 22:59:30 -0800 (PST) From: Manivannan Sadhasivam To: martin.petersen@oracle.com, jejb@linux.ibm.com Cc: andersson@kernel.org, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, quic_cang@quicinc.com, ahalaney@redhat.com, quic_nitirawa@quicinc.com, Manivannan Sadhasivam Subject: [PATCH v2 03/17] scsi: ufs: qcom: Fix the return value when platform_get_resource_byname() fails Date: Fri, 8 Dec 2023 12:28:48 +0530 Message-Id: <20231208065902.11006-4-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231208065902.11006-1-manivannan.sadhasivam@linaro.org> References: <20231208065902.11006-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 07 Dec 2023 22:59:52 -0800 (PST) The return value should be -ENODEV indicating that the resource is not provided in DT, not -ENOMEM. Fix it! Fixes: c263b4ef737e ("scsi: ufs: core: mcq: Configure resource regions") Reviewed-by: Andrew Halaney Signed-off-by: Manivannan Sadhasivam --- drivers/ufs/host/ufs-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index 852179e456f2..778df0a9c65e 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -1701,7 +1701,7 @@ static int ufs_qcom_mcq_config_resource(struct ufs_hba *hba) if (!res->resource) { dev_info(hba->dev, "Resource %s not provided\n", res->name); if (i == RES_UFS) - return -ENOMEM; + return -ENODEV; continue; } else if (i == RES_UFS) { res_mem = res->resource; -- 2.25.1