[PATCH -next] drm/vmwgfx: Fix return value check in vmw_setup_pci_resources()

2021-05-14 Thread Qiheng Lin
In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. After that, the error code -ENOMEM should be returned. Reported-by: Hulk Robot Signed-off-by: Qiheng Lin --- drivers/gpu/drm/vmwgfx

[PATCH -next] drm: bridge: fix wrong pointer passed to PTR_ERR()

2021-05-14 Thread Qiheng Lin
PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned. Reported-by: Hulk Robot Signed-off-by: Qiheng Lin --- drivers/gpu/drm/bridge/ite-it66121.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/ite

[PATCH -next] drm/i915/display: remove redundant NULL check

2021-04-09 Thread Qiheng Lin
Fix the following coccicheck warning: drivers/gpu/drm/i915/display/intel_psr.c:1530:29-31: WARNING !A || A && B is equivalent to !A || B Signed-off-by: Qiheng Lin --- drivers/gpu/drm/i915/display/intel_psr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers

[PATCH -next] drm/etnaviv: remove unneeded if-null-free check

2021-04-09 Thread Qiheng Lin
/drm/etnaviv/etnaviv_gem_submit.c:620:2-8: WARNING: NULL check before some freeing functions is not needed. drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c:622:2-8: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Qiheng Lin --- drivers/gpu/drm/etnaviv