Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755228AbdDMSD3 (ORCPT ); Thu, 13 Apr 2017 14:03:29 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:46452 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752890AbdDMSD0 (ORCPT ); Thu, 13 Apr 2017 14:03:26 -0400 From: Mark Brown To: Dong Aisheng Cc: linux-kernel@vger.kernel.org, Mark Brown Date: Thu, 13 Apr 2017 19:03:16 +0100 Message-Id: <20170413180316.617-2-broonie@kernel.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170413180316.617-1-broonie@kernel.org> References: <20170413180316.617-1-broonie@kernel.org> X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: [PATCH 2/2] regulator: core: Allow dummy regulators for supplies X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 814 Lines: 29 Rather than just not resolving the supply when there is explicitly no supply mapping fall through and allow a dummy supply to be substituted. Signed-off-by: Mark Brown --- drivers/regulator/core.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 2b464a286451..047ada74aa4a 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1533,14 +1533,6 @@ static int regulator_resolve_supply(struct regulator_dev *rdev) if (IS_ERR(r)) { ret = PTR_ERR(r); - if (ret == -ENODEV) { - /* - * No supply was specified for this regulator and - * there will never be one. - */ - return 0; - } - /* Did the lookup explicitly defer for us? */ if (ret == -EPROBE_DEFER) return ret; -- 2.11.0