drm/msm: Fix inverted WARN_ON() logic
We want to WARN_ON() if info is NULL.
Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Fixes: 0838fc3e67 ("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/
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user