Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp47236lqd; Tue, 23 Apr 2024 14:11:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUrSeFGsVoUc7YiY0kXMGxaLaufk0FlubkfSf4fLNSnJOKus035W4GRln6+szUP/KVpG3JjUvUvW5bxWTKzsd8YeUYdxdRXWHQ0vOIi0w== X-Google-Smtp-Source: AGHT+IHWLeDzvNm4omuqsS9N6MYdUnloz7tVasS28mik7P1vfNXUIjHQThg/6GdOoLXy2F6EUziJ X-Received: by 2002:a05:6a20:9492:b0:1a9:c13e:f211 with SMTP id hs18-20020a056a20949200b001a9c13ef211mr495550pzb.47.1713906698224; Tue, 23 Apr 2024 14:11:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713906698; cv=pass; d=google.com; s=arc-20160816; b=PEt2nL7nQOQ6tKzKa14jA1ZStgtHg1HLI75x/1IXjZsBeNHM+RH50m2y/aBZ4WgdQp Ozl7CwOe2e6Si8RGAaSbmjzOjBjnSKMLWRS0buRz0Lq+vbeBGgSF+pvUzZp9HGH9sZxa UbOIoQMvV2pD2Rhg83+ljdvdutHYQFO6dG10FaKTWqtxpZFD7JO33ZevzLDyqRx24zrO h8HhkOBsPR1dZO9+/+e5kT7t1Zyr390gYmLqDiuYe76fW7KxJrkZxzMy69xojM3bYR1k rl4e+IdWrA1mVTHpyZzfz27Nnywchettzf+WXHS2Y7E4XCetfLeok/UestB9qysdK7I1 kIkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=rbXwx/HNBBmagZEhDQ/BaLCRVM/2fRQKE1iroB24Qwo=; fh=jiQY8Hbq72z4QEk0fQ/zW0IPGc+Scj8cjWVkEj54cmg=; b=Uuf/B+zb6zN6mKEfISHqo9GcUjlpfmNm37oEU2VWUTHsafTOBN+wrf7iEO1uUCawqV cIMyjZ1y00nQWe3/1mooer+n9NU90SYAFhSeDFsFDWe+ax3fMOvU2xNrCwicH+HeizgD gpjd706fg9NEjpqC8neZ71K/aI6gRuGPQ4DQA/dUsC+2/Ja06XjLQUQN3/PUPQULXC6D +3KR5TzUhWsvi/OpcfMRaVN0C3ILPX2pMTkaV8dQYk1zfoanxboKFbeDly91DL5BttxF I+7/p35oeBkb9B6E2LXsCA+yIUD8a37zYFxZm720SUAtkBNVz77xMDRxcvcPurxjStI8 2AAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yrnYyhEn; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-155888-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155888-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id i128-20020a636d86000000b005f7fc79eed4si8131765pgc.271.2024.04.23.14.11.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 14:11:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155888-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yrnYyhEn; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-155888-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155888-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id CDFB3B299BD for ; Tue, 23 Apr 2024 20:54:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA5C0143894; Tue, 23 Apr 2024 20:50:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="yrnYyhEn" Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7673D14884D for ; Tue, 23 Apr 2024 20:50:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713905442; cv=none; b=LFIPcwXTRS3TXpj8Sn+SFd/gcMo/JGIqbckCu7t2B0FgynD8lDAflmkcAPnuqxOob92kZiP+gL4drAC19UVmYHp+ZNNLypb+jL9DlaXgeRfeG9qe19xIf/Wvh0ABokMyCt+kAVj0S73yblnvpklBXPazPMCLYvX3PnyHD6kUDf8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713905442; c=relaxed/simple; bh=n9yKBX8qjigC7/F1M8bGWOMSsRVeFv1nqroVB06gU6s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Gzx1atPYDF0hqnPIInazb6JBcWqlCDF0fyPaf+UqKGshxeO26rKVsiB5KIv+RhAxN+zye3UqlPHFK/4928AbmKfpSMP/NNc6wS171Bx3raWW5RNVR5We+5x+BYrc+xfAlv1YUmTgLUzMDj4moTUKxDygiHroHNn1Zlu/U+8MZZE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=yrnYyhEn; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-41aa45251eeso13714655e9.3 for ; Tue, 23 Apr 2024 13:50:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713905440; x=1714510240; 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=rbXwx/HNBBmagZEhDQ/BaLCRVM/2fRQKE1iroB24Qwo=; b=yrnYyhEnOKtUI5APqUrLIGkdaBVwqLwltxjoo3rEiYHgDy3vtzPGG1JIAcv/jCkHHX Y1JqXXX1hARwF4/LAlhpQxGFsEQMtlE2RFyDr3Hkhg7e0BF5bmT2f3eqUrCb9aXzYjZv XwPaefIT5P3cJ2XRUMXZGoxTht1r9dTIDiocRCavryAE0CU+gAEM879+Qh9lFYlLkFUA cmae8l/0gwlfmP8b/W34RHnNRqp6qofVyOnd1BiVULbsFxijJCzR2qsusSjiyYizaC04 xc2vViHYI5+YPGqlp3QQEteAeqHsO+spp8M0nJKvQEtmaynBPagEOeTNqU5m30RQljNz 0pgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713905440; x=1714510240; 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=rbXwx/HNBBmagZEhDQ/BaLCRVM/2fRQKE1iroB24Qwo=; b=MC7HwnT7LTQROo/5c5EYR5EczEMibzA0J9KO8JbpSW1mevMNGRc0hoBgxJUwoa4+wV hym+I1kDBvBWhuuOTpXslqhHeskunw09UqxB4nSwT/aUFct/C8Aq/KJEmWfeGxaFzHfv 6qZEpLtkWeYN8v+vAd8DWjurJMBdV+Ut2X4SJ/WTpniPZCuKpwsN3/t+RMckhQV1wIs2 XKVjmdmBdeFY3GU4uFd4+i6wiBykIRtJ4vqT4ISQ+RDdUBT5zQ1oE4X1S2wP80944AQ9 8Ag37nJmAmauZHUWhMMMXw5TQqaW9202lC8aw40XLIhMbzVZplEyyvvtLf/3aiHdGThe QVNQ== X-Forwarded-Encrypted: i=1; AJvYcCWl0BzBjO1bwUJggrz5A+6pLwO/9ipgw5/db/0+Zcphw5D2hAiEq0WPeocw81XJ4sVnNem4NlBmsjbkjS9KBSqMo+Z3BErB60xgjpYp X-Gm-Message-State: AOJu0YxVMDBQywRJkH/620OA88FDb/PUJsii+irH9/qI4Zs5eVQFfp15 3X2Hn9tsSEMlslculTNso0t9daEEHwLhkwYf69iJINxVs/X44cG4axVEMIPa1JM= X-Received: by 2002:a05:600c:35c4:b0:417:ee98:dfac with SMTP id r4-20020a05600c35c400b00417ee98dfacmr271852wmq.34.1713905440049; Tue, 23 Apr 2024 13:50:40 -0700 (PDT) Received: from gpeter-l.lan ([2a0d:3344:2e8:8510:4269:2542:5a09:9ca1]) by smtp.gmail.com with ESMTPSA id bg5-20020a05600c3c8500b00419f419236fsm13065443wmb.41.2024.04.23.13.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 13:50:39 -0700 (PDT) From: Peter Griffin To: mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, vkoul@kernel.org, kishon@kernel.org, alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, s.nawrocki@samsung.com, cw00.choi@samsung.com, jejb@linux.ibm.com, martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, ebiggers@kernel.org Cc: linux-scsi@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tudor.ambarus@linaro.org, andre.draszik@linaro.org, saravanak@google.com, willmcvicker@google.com, Peter Griffin Subject: [PATCH v2 14/14] phy: samsung-ufs: ufs: exit on first reported error Date: Tue, 23 Apr 2024 21:50:06 +0100 Message-ID: <20240423205006.1785138-15-peter.griffin@linaro.org> X-Mailer: git-send-email 2.44.0.769.g3c40516874-goog In-Reply-To: <20240423205006.1785138-1-peter.griffin@linaro.org> References: <20240423205006.1785138-1-peter.griffin@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To preserve the err value, exit the loop immediately if an error is returned. Fixes: f2c6d0fa197a ("phy: samsung-ufs: use exynos_get_pmu_regmap_by_phandle() to obtain PMU regmap") Signed-off-by: Peter Griffin --- drivers/phy/samsung/phy-samsung-ufs.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/phy/samsung/phy-samsung-ufs.c b/drivers/phy/samsung/phy-samsung-ufs.c index ffc46c953ed6..6c5d41552649 100644 --- a/drivers/phy/samsung/phy-samsung-ufs.c +++ b/drivers/phy/samsung/phy-samsung-ufs.c @@ -99,12 +99,18 @@ static int samsung_ufs_phy_calibrate(struct phy *phy) for_each_phy_lane(ufs_phy, i) { if (ufs_phy->ufs_phy_state == CFG_PRE_INIT && - ufs_phy->drvdata->wait_for_cal) + ufs_phy->drvdata->wait_for_cal) { err = ufs_phy->drvdata->wait_for_cal(phy, i); + if (err) + goto out; + } if (ufs_phy->ufs_phy_state == CFG_POST_PWR_HS && - ufs_phy->drvdata->wait_for_cdr) + ufs_phy->drvdata->wait_for_cdr) { err = ufs_phy->drvdata->wait_for_cdr(phy, i); + if (err) + goto out; + } } /** -- 2.44.0.769.g3c40516874-goog