[Intel-gfx] [PATCH -next] drm/i915: fix possible memory leak in intel_hdcp_auth_downstream()

2019-07-05 Thread Wei Yongjun
'ksv_fifo' is malloced in intel_hdcp_auth_downstream() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Signed-off-by: Wei Yongjun --- drivers/gpu/drm/i915/display/intel_hdcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[Intel-gfx] [PATCH -next] drm/i915: Fix return value check in kfence selftests

2017-05-18 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fix the return value check which testing the wrong variable. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/gpu/drm/i915/selftests/i915_sw_fence.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dri

[Intel-gfx] [PATCH -next] drm/i915/gvt: fix return value check

2016-10-19 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> In case of error, the function i915_gem_object_create() returns ERR_PTR() not NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/gpu/drm/i915/gvt/

[Intel-gfx] [PATCH -next] drm/i915: Fix non static symbol warning

2016-09-16 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warning: drivers/gpu/drm/i915/intel_dp.c:1527:5: warning: symbol 'intel_dp_compute_bpp' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/gpu/drm/i915/in

[Intel-gfx] [PATCH -next] drm/i915: Fix non static symbol warning

2016-08-21 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warning: drivers/gpu/drm/i915/intel_hotplug.c:480:6: warning: symbol 'i915_hpd_poll_init_work' was not declared. Should it be static? Also move the '{' to new line. Signed-off-by: Wei Yongjun <weiyongj...@h

[Intel-gfx] [PATCH -next] drm/i915: fix return value check of debugfs_create_file()

2013-12-15 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function debugfs_create_file() returns NULL pointer not ERR_PTR() if debugfs is enabled. The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn

[Intel-gfx] [PATCH -next] drm/i915: fix potential NULL pointer dereference in i915_gem_context_get_hang_stats()

2013-06-19 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn The dereference should be moved below the NULL test. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/gpu/drm/i915/i915_gem_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH -next] drm/i915: fix error return code in init_pipe_control()

2013-05-28 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return -ENOMEM in the kmap() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/gpu/drm/i915/intel_ringbuffer.c | 6 -- 1 file changed, 4 insertions