From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BC7BC4742C for ; Sun, 8 Nov 2020 19:07:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE94420731 for ; Sun, 8 Nov 2020 19:07:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604862466; bh=inX3Z2q2s/PA4nYuxvOCusFtoGVisOjnZCm4TgBHGyA=; h=Subject:To:Cc:From:Date:List-ID:From; b=mb4SDoBZBCjb3VDdzNj6JHYmnT8/VhFFHdETIX565tit1RsaJ7pH5m80t02YZlJig vKzA6I83vcGl7EkjNSwqushWm9ro0fP5p5zCJMfXSoSNqyRZHeaMSQAgypwswOMgrx //2jcHYMHZTmkZtni9FoHjpHTNA+SSMeUyru9qfc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728817AbgKHTHq (ORCPT ); Sun, 8 Nov 2020 14:07:46 -0500 Received: from wforward3-smtp.messagingengine.com ([64.147.123.22]:59461 "EHLO wforward3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727570AbgKHTHq (ORCPT ); Sun, 8 Nov 2020 14:07:46 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailforward.west.internal (Postfix) with ESMTP id 190148EE; Sun, 8 Nov 2020 14:07:45 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sun, 08 Nov 2020 14:07:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=ougGoI cIYr9hi1k/LBjYgR8aBGTgehlYWKUloIV7DwU=; b=TGUbKih8PwtKY16i0Rqjkj LNS7mbooK7/mGDNx2rR/Ymjq4et3Dkl2XzujkYljtCuwY2bvcwWIbAcMcweun46u 0zjin99aHHhjhD/DNxxWEmn9uLwlP3pqTzCMYwLB8rHUg80pU4UuiHHOKb5g16mv qeyWXcbR62Ny6LZdiKNpQm5tPAKTq2kWMkhvzsXkAhOpYehfE4pNL+l7xplMrrwm ITgTnkMonenU8HPU4AZroTcuSR9hApoYn/3mKGBy5VUNv5zJ6PmffFXPtLp9O379 Y9gG0/xDHuKACH6Q8wEPygLjWNQdJUO0Hpl+aCcyy3rFHIg+NI1Ued9tKQfpg7VA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddufedguddvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvhfffkfggtgfgsehtkeertd dttdejnecuhfhrohhmpeeoghhrvghgkhhhsehlihhnuhigfhhouhhnuggrthhiohhnrdho rhhgqeenucggtffrrghtthgvrhhnpeekjefgffetgfevgeeghedugfelheektdehtdeihf eileeiteevjedvgfdvleejleenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecukfhp peekfedrkeeirdejgedrieegnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpe hmrghilhhfrhhomhepghhrvghgsehkrhhorghhrdgtohhm X-ME-Proxy: Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) by mail.messagingengine.com (Postfix) with ESMTPA id 41CC13280059; Sun, 8 Nov 2020 14:07:44 -0500 (EST) Subject: FAILED: patch "[PATCH] regulator: defer probe when trying to get voltage from" failed to apply to 4.14-stable tree To: mirq-linux@rere.qmqm.pl, broonie@kernel.org, clabbe.montjoie@gmail.com, megous@megous.com Cc: From: Date: Sun, 08 Nov 2020 20:08:37 +0100 Message-ID: <16048625179740@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.14-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From cf1ad559a20d1930aa7b47a52f54e1f8718de301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Date: Mon, 2 Nov 2020 22:27:27 +0100 Subject: [PATCH] regulator: defer probe when trying to get voltage from unresolved supply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit regulator_get_voltage_rdev() is called in regulator probe() when applying machine constraints. The "fixed" commit exposed the problem that non-bypassed regulators can forward the request to its parent (like bypassed ones) supply. Return -EPROBE_DEFER when the supply is expected but not resolved yet. Fixes: aea6cb99703e ("regulator: resolve supply after creating regulator") Cc: stable@vger.kernel.org Signed-off-by: Michał Mirosław Reported-by: Ondřej Jirman Reported-by: Corentin Labbe Tested-by: Ondřej Jirman Link: https://lore.kernel.org/r/a9041d68b4d35e4a2dd71629c8a6422662acb5ee.1604351936.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index a4ffd71696da..a5ad553da8cd 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -4165,6 +4165,8 @@ int regulator_get_voltage_rdev(struct regulator_dev *rdev) ret = rdev->desc->fixed_uV; } else if (rdev->supply) { ret = regulator_get_voltage_rdev(rdev->supply->rdev); + } else if (rdev->supply_name) { + return -EPROBE_DEFER; } else { return -EINVAL; }