[PATCH] drm/msm: Fix inverted WARN_ON() logic

From: Rob Clark
Date: Fri Jun 13 2025 - 10:42:21 EST


We want to WARN_ON() if info is NULL.

Suggested-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Fixes: 0838fc3e6718 ("drm/msm/adreno: Check for recognized GPU before bind")
Tested-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Signed-off-by: Rob Clark <robin.clark@xxxxxxxxxxxxxxxx>
---
drivers/gpu/drm/msm/adreno/adreno_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
index 0d12454b1f2e..5c52d392427f 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_device.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
@@ -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;
--
2.49.0