[PATCH] drm/virtio: fix the missed drm_gem_object_put() in virtio_gpu_user_framebuffer_create()

2021-10-09 Thread Jing Xiangfeng
virtio_gpu_user_framebuffer_create() misses to call drm_gem_object_put() in an error path. Add the missed function call to fix it. Signed-off-by: Jing Xiangfeng --- drivers/gpu/drm/virtio/virtgpu_display.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH] drm/gma500: Add the missed drm_gem_object_put() in psb_user_framebuffer_create()

2021-06-29 Thread Jing Xiangfeng
psb_user_framebuffer_create() misses to call drm_gem_object_put() in an error path. Add the missed function call to fix it. Signed-off-by: Jing Xiangfeng --- drivers/gpu/drm/gma500/framebuffer.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500

[PATCH -next] drm/radeon: Add the missed drm_gem_object_put() in radeon_user_framebuffer_create()

2021-06-29 Thread Jing Xiangfeng
radeon_user_framebuffer_create() misses to call drm_gem_object_put() in an error path. Add the missed function call to fix it. Signed-off-by: Jing Xiangfeng --- drivers/gpu/drm/radeon/radeon_display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/radeon_display.c b

[PATCH] drm: Add the missed device_unregister() in drm_sysfs_connector_add()

2020-10-23 Thread Jing Xiangfeng
drm_sysfs_connector_add() misses to call device_unregister() when sysfs_create_link() fails to create. Add the missed function call to fix it. Fixes: e1a29c6c5955 ("drm: Add ddc link in sysfs created by drm_connector") Signed-off-by: Jing Xiangfeng --- drivers/gpu/drm/drm_sy

[PATCH v2] fbcon: Remove the superfluous break

2020-09-18 Thread Jing Xiangfeng
Remove the superfluous break, as there is a 'return' before it. Fixes: bad07ff74c32 ("fbcon: smart blitter usage for scrolling") Signed-off-by: Jing Xiangfeng Reviewed-by: Nick Desaulniers Reviewed-by: Gustavo A. R. Silva --- drivers/video/fbdev/core/fbcon.c | 2 -

Re: [PATCH] fbcon: Remove the superfluous break

2020-09-18 Thread Jing Xiangfeng
On 2020/9/18 2:52, Gustavo A. R. Silva wrote: On 9/17/20 08:15, Jing Xiangfeng wrote: Remove the superfuous break, as there is a 'return' before it. Signed-off-by: Jing Xiangfeng Reviewed-by: Gustavo A. R. Silva Also, the following Fixes tag should be included in the chan

Re: [PATCH] fbcon: Remove the superfluous break

2020-09-18 Thread Jing Xiangfeng
On 2020/9/18 1:36, Nick Desaulniers wrote: On Thu, Sep 17, 2020 at 6:15 AM Jing Xiangfeng wrote: Remove the superfuous break, as there is a 'return' before it. superfluous (missed "l") Thanks for correcting! Signed-off-by: Jing Xiangfeng Reviewed-by: Nick

[PATCH] drm/ttm: remove redundant initialization of variable ret

2020-09-17 Thread Jing Xiangfeng
The variable ret is being initialized with '-ENOMEM' that is meaningless. So remove it. Signed-off-by: Jing Xiangfeng --- drivers/gpu/drm/ttm/ttm_tt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_

[PATCH] fbcon: Remove the superfluous break

2020-09-17 Thread Jing Xiangfeng
Remove the superfuous break, as there is a 'return' before it. Signed-off-by: Jing Xiangfeng --- drivers/video/fbdev/core/fbcon.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index 0b49b0f44edf..623359aad

Re: [PATCH] drm/mm: prevent a potential null-pointer dereference

2020-09-11 Thread Jing Xiangfeng
On 2020/9/10 16:58, Christian König wrote: Am 10.09.20 um 04:38 schrieb Jing Xiangfeng: The macro 'DECLARE_NEXT_HOLE_ADDR' may hit a potential null-pointer dereference. So use 'entry' after checking it. I don't see a potential null-pointer dereference here. W

[PATCH] drm/mm: prevent a potential null-pointer dereference

2020-09-10 Thread Jing Xiangfeng
The macro 'DECLARE_NEXT_HOLE_ADDR' may hit a potential null-pointer dereference. So use 'entry' after checking it. Fixes: 5fad79fd66ff ("drm/mm: cleanup and improve next_hole_*_addr()") Signed-off-by: Jing Xiangfeng --- drivers/gpu/drm/drm_mm.c | 7 +-- 1 fi

[PATCH] drm/nouveau/acr: fix a coding style in nvkm_acr_lsfw_load_bl_inst_data_sig()

2020-08-03 Thread Jing Xiangfeng
This patch performs the following changes: 1. remove a redundant parentheses around the nvkm_acr_lsfw_add() calls 2. do assignment before this if condition, it is more readable Signed-off-by: Jing Xiangfeng --- drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c | 3 ++- 1 file changed, 2

[PATCH] drm: remove redundant assignment to variable 'ret'

2020-07-16 Thread Jing Xiangfeng
The variable ret has been assigned the value '-EINVAL'. The assignment in the if() is redundant. We can remove it. Signed-off-by: Jing Xiangfeng --- drivers/gpu/drm/drm_auth.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_au

Re: [PATCH] drm: remove redundant assignment to variable 'ret'

2020-07-16 Thread Jing Xiangfeng
On 2020/7/15 20:05, Daniel Vetter wrote: On Wed, Jul 15, 2020 at 03:05:59PM +0800, Jing Xiangfeng wrote: The variable ret has been assigned the value '-EINVAL'. The assignment in the if() is redundant. We can remove it. Nope, that's not correct. Before this assignement ret i

[PATCH] drm/nouveau: add the missed kfree() for nouveau_bo_alloc()

2020-07-16 Thread Jing Xiangfeng
nouveau_bo_alloc() misses to call kfree() in an error path. Add the missed function call to fix it. Signed-off-by: Jing Xiangfeng --- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu