lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1439567497-13855-1-git-send-email-srinivas.kandagatla@linaro.org>
Date:	Fri, 14 Aug 2015 16:51:37 +0100
From:	Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:	Thierry Reding <thierry.reding@...il.com>,
	dri-devel@...ts.freedesktop.org
Cc:	David Airlie <airlied@...ux.ie>, linux-kernel@...r.kernel.org,
	linux-arm-msm@...r.kernel.org, robdclark@...il.com, bjorn@...o.se,
	Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Subject: [PATCH RFC 5/5] drm/msm: mdp4 lvds: Check the panel node in detect_panel()

This patch checks if the panel node is disabled in DT or not, this would
let us return proper error code so that the driver could stop panel
specific intialization.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
---
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c
index ad02b8b..167f402 100644
--- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c
+++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c
@@ -262,6 +262,11 @@ static struct drm_panel *detect_panel(struct drm_device *dev)
 
 	of_node_put(endpoint);
 
+	if (!of_device_is_available(panel_node)) {
+		dev_err(dev->dev, "panel is not enabled in DT\n");
+		return ERR_PTR(-ENODEV);
+	}
+
 	panel = of_drm_find_panel(panel_node);
 	if (!panel) {
 		of_node_put(panel_node);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ