Skip to contentSkip to conversation

drm/bridge: it66121: Remove a duplicated invoke of of_device_is_available()

PATCH Applied Sui Jingfeng 3 participants 3 messages Mar 16, 2024 – Mar 18, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/bridge: it66121: Remove a duplicated invoke of of_device_is_available()

The calling of of_device_is_available() in it66121_probe() is duplicated, as the of_graph_get_remote_node() has already do the check for us. There is no need to call it again, thus delete the later one.

---
 drivers/gpu/drm/bridge/ite-it66121.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/gpu/drm/bridge/ite-it66121.c +0 -6
index 052884058644..925e42f46cd8 100644
@@ -1540,12 +1540,6 @@ static int it66121_probe(struct i2c_client *client)
 		return -EINVAL;
 	}
 
-	if (!of_device_is_available(ep)) {
-		of_node_put(ep);
-		dev_err(ctx->dev, "The remote device is disabled\n");
-		return -ENODEV;
-	}
-
 	ctx->next_bridge = of_drm_find_bridge(ep);
 	of_node_put(ep);
 	if (!ctx->next_bridge) {
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Sui Jingfeng

The calling of of_device_is_available() in it66121_probe() is duplicated, as the of_graph_get_remote_node() has already do the check for us. There is no need to call it again, thus delete the later one.

---
 drivers/gpu/drm/bridge/ite-it66121.c | 6 ------
 1 file changed, 6 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
maintainer Applied
#2 lore raw
In reply to Sui Jingfeng

Hi,

Quoted 5 lines · Sui Jingfeng

The calling of of_device_is_available() in it66121_probe() is duplicated, as the of_graph_get_remote_node() has already do the check for us. There is no need to call it again, thus delete the later one.

Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)

[1/1] drm/bridge: it66121: Remove a duplicated invoke of of_device_is_available()

      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/2c7d26555845ca5fb70353b4b77d8f6c4e32e54c
Signature · 1 line
Neil