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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220310091653.1298588-1-xji@analogixsemi.com>
Date:   Thu, 10 Mar 2022 17:16:53 +0800
From:   Xin Ji <xji@...logixsemi.com>
To:     Andrzej Hajda <andrzej.hajda@...el.com>,
        Neil Armstrong <narmstrong@...libre.com>,
        Robert Foss <robert.foss@...aro.org>,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
        Jonas Karlman <jonas@...boo.se>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, Xin Ji <xji@...logixsemi.com>
Cc:     bliang@...logixsemi.com, qwen@...logixsemi.com,
        hsinyi@...omium.org, mliu@...logixsemi.com,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH] drm/bridge: anx7625: Fix not correct get property counts

The property length which returns from "of_get_property", divided by
sizeof(int) to get the total property counts.

Fixes: fd0310b6fe7d ("drm/bridge: anx7625: add MIPI DPI input feature")

Signed-off-by: Xin Ji <xji@...logixsemi.com>
---
 drivers/gpu/drm/bridge/analogix/anx7625.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index c6a9a02ed762..87081d5b408d 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -1594,6 +1594,7 @@ static int anx7625_get_swing_setting(struct device *dev,
 
 	if (of_get_property(dev->of_node,
 			    "analogix,lane0-swing", &num_regs)) {
+		num_regs /= sizeof(int);
 		if (num_regs > DP_TX_SWING_REG_CNT)
 			num_regs = DP_TX_SWING_REG_CNT;
 
@@ -1604,6 +1605,7 @@ static int anx7625_get_swing_setting(struct device *dev,
 
 	if (of_get_property(dev->of_node,
 			    "analogix,lane1-swing", &num_regs)) {
+		num_regs /= sizeof(int);
 		if (num_regs > DP_TX_SWING_REG_CNT)
 			num_regs = DP_TX_SWING_REG_CNT;
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ