Skip to contentSkip to conversation

drm/msm: Fix inverted WARN_ON() logic

PATCH In review Rob Clark 4 participants 5 messages Jun 13, 2025 – Jun 14, 2025

Subsystems (4)
lore
Share & tools
lore

Rob Clark

author maintainer
#0 lore raw

PATCH 1/1 drm/msm: Fix inverted WARN_ON() logic

We want to WARN_ON() if info is NULL.

Fixes 0838fc3e6718 ("drm/msm/adreno: Check for recognized GPU before bind")
---
 drivers/gpu/drm/msm/adreno/adreno_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/adreno/adreno_device.c +1 -1
index 0d12454b1f2e..5c52d392427f 100644
@@ -217,7 +217,7 @@ static int adreno_bind(struct device *dev, struct device *master, void *data)
 
 	info = adreno_info(config.chip_id);
 	/* We shouldn't have gotten this far if we don't recognize the GPU: */
-	if (!WARN_ON(info))
+	if (WARN_ON(!info))
 		return -ENXIO;
 
 	config.info = info;
Signature · 1 line
2.49.0
#2 lore raw
In reply to Rob Clark
Quoted 8 lines · Rob Clark

We want to WARN_ON() if info is NULL.

Fixes 0838fc3e6718 ("drm/msm/adreno: Check for recognized GPU before bind")
---
 drivers/gpu/drm/msm/adreno/adreno_device.c | 2 +-

Apart from tag problem it is usually a good idea to add relevant people in c/c. Especially when you fix the reported bug.

Best regards,
Alexey

Reviewed-by
#3 lore raw
Quoted 10 lines · Alexey Klimov
Quoted 8 lines · Rob Clark

We want to WARN_ON() if info is NULL.

Fixes 0838fc3e6718 ("drm/msm/adreno: Check for recognized GPU before bind")
---
 drivers/gpu/drm/msm/adreno/adreno_device.c | 2 +-
Quoted 2 lines

Apart from tag problem it is usually a good idea to add relevant people in c/c. Especially when you fix the reported bug.

with Alexey's concerns addressed:

Konrad

#4 lore raw
Quoted 12 lines · Konrad Dybcio
Quoted 10 lines · Alexey Klimov
Quoted 8 lines · Rob Clark

We want to WARN_ON() if info is NULL.

Fixes 0838fc3e6718 ("drm/msm/adreno: Check for recognized GPU before bind")
---
 drivers/gpu/drm/msm/adreno/adreno_device.c | 2 +-
Quoted 6 lines
Quoted 2 lines

Apart from tag problem it is usually a good idea to add relevant people in c/c. Especially when you fix the reported bug.

with Alexey's concerns addressed:

Oops, forgot the reported-by.. but replying with the tag on list is enough, it will be picked up when I apply the patch

BR,
-R