From patchwork Fri Nov 8 17:32:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 178922 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3026011ilf; Fri, 8 Nov 2019 09:32:18 -0800 (PST) X-Google-Smtp-Source: APXvYqwiIuCNMJW7MClj3kwT/nz4cYv8XoCCu8hwDa+e2yyaYMQhpln4O40hz/S3QRztHVgaBOnU X-Received: by 2002:a63:e307:: with SMTP id f7mr13646143pgh.101.1573234338625; Fri, 08 Nov 2019 09:32:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573234338; cv=none; d=google.com; s=arc-20160816; b=mW/Xh84JJvn8fXyYkUPObKZ2sqKdk0Xfc9qewtNhTQ2hSSoehn3x3Qxh52kYLgTMoR b1irLhhETQNJL/ivhZUAC34AGoWi+/tPgfhivksYMNLXxFo+dqF5T8GI/8BHII8OWRI5 u65kmTYfOhCPW+24t8T5N6Pcp0bZ8GuFxU+Fwv+lV/mEQvs6kJBIYcNOOdegYgs4jq1B k9SeoEkuxRLKNs9L/AOivGP4ptkmmKpaZbGb+eQiNQEuFd4UOj0ooxAnexgARTV/3WeI JPw/nPbxkQtkPYtq6EDn3sv0ao6/ix/6+c1+kqKhu4mOcKaNkvxVhm0sDAxzccqLRsq5 +WBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=A5OqmMawG1SE/2XnQ3F2dyzSIAM3licpULEjgdCZgBg=; b=TOjM0DDOD1OY+O/eAL8ZCXvvIvloOvpJU5aE95WN0WG3H1JS0JAbOIJq199pGlw7Cy WtTTG/pn5F+XVxE2T4lA4RY16afg7mZYCU4IOJDxUpSY6iaITaN18M/GWdcRnSV//H0m GZd1IMe0ktgeevAu8X35FQ7wTsV3QBR4K670i23MVqR7m4Y7Offvb7SXYClQObtqtKkh m5n6ghz2aCJfXBzlGHqHqfI6KNUe8yJj9shfrRk7WF5V3HKfa0KEwsud2SrNZlmljdy5 Grfcu37JBFaDhYEs2PigNJi3ow2DmNpgULs932a8odYPHV2SHe4cBgdbZ/kZjc4xZ4sh pA2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id 89si7984431plf.287.2019.11.08.09.32.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Nov 2019 09:32:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D6886FA32; Fri, 8 Nov 2019 17:32:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5C7A76FA32 for ; Fri, 8 Nov 2019 17:32:15 +0000 (UTC) Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=ypsilon.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iT87F-0007oJ-Uh; Fri, 08 Nov 2019 17:32:09 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id 10EAA2741460; Fri, 8 Nov 2019 17:32:08 +0000 (GMT) From: Mark Brown To: Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter Subject: [PATCH] drm/bridge: thc63lvd1024: Fix regulator_get_optional() misuse Date: Fri, 8 Nov 2019 17:32:08 +0000 Message-Id: <20191108173208.51677-1-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ug+z///iKC7pDH1D8YK19B14EWxH0/NrfuQ1THLJhuA=; b=j+A4pncisltcBkNli/kYXdmCS tslIBNQ+ghnEJloFUKb+JMybCH+LLw0otmopQCWWeTgsIOAPvdCCRfhMHqLiBeuw2HxIkp1Abn4/i jAiR7wgGP1UFhfGC0YsA2FhPcE8TRprEWSFcy23u1SIZK7p8TATveW80GsESAgBNImPdY=; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Brown , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The thc63lvd1024 driver requests a supply using regulator_get_optional() but both the name of the supply and the usage pattern suggest that it is being used for the main power for the device and is not at all optional for the device for function, there is no handling at all for absent supplies. Such regulators should use the vanilla regulator_get() interface, it will ensure that even if a supply is not described in the system integration one will be provided in software. Signed-off-by: Mark Brown Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/bridge/thc63lvd1024.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/thc63lvd1024.c b/drivers/gpu/drm/bridge/thc63lvd1024.c index 3d74129b2995..ffca28ccc2c4 100644 --- a/drivers/gpu/drm/bridge/thc63lvd1024.c +++ b/drivers/gpu/drm/bridge/thc63lvd1024.c @@ -200,7 +200,7 @@ static int thc63_probe(struct platform_device *pdev) thc63->dev = &pdev->dev; platform_set_drvdata(pdev, thc63); - thc63->vcc = devm_regulator_get_optional(thc63->dev, "vcc"); + thc63->vcc = devm_regulator_get(thc63->dev, "vcc"); if (IS_ERR(thc63->vcc)) { if (PTR_ERR(thc63->vcc) == -EPROBE_DEFER) return -EPROBE_DEFER;