]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/msm: Fix inverted WARN_ON() logic
authorRob Clark <robin.clark@oss.qualcomm.com>
Fri, 13 Jun 2025 14:41:44 +0000 (07:41 -0700)
committerRob Clark <robin.clark@oss.qualcomm.com>
Sat, 14 Jun 2025 15:10:44 +0000 (08:10 -0700)
We want to WARN_ON() if info is NULL.

Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Fixes: 0838fc3e6718 ("drm/msm/adreno: Check for recognized GPU before bind")
Tested-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Reported-by: Alexey Klimov <alexey.klimov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/658631/

drivers/gpu/drm/msm/adreno/adreno_device.c

index 5e730756723989a90cd11f8d607af283397b79da..16e7ac444efd6c02b4528fa090a05c9901a88ae7 100644 (file)
@@ -221,7 +221,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;