Re: [PATCH] drm/amdgpu: Modify error handling in amdgpu_ttm

2016-08-05 Thread Christian König
Am 04.08.2016 um 17:42 schrieb Amitoj Kaur Chawla: To indicate an error, debugfs_create_file can return an ERR_PTR for !CONFIG_DEBUG_FS and NULL otherwise, so in case the result is dereferenced there should be a previous IS_ERR and a NULL check. The Coccinelle semantic patch used to find the iss

[PATCH] drm/amdgpu: Modify error handling in amdgpu_ttm

2016-08-04 Thread Amitoj Kaur Chawla
To indicate an error, debugfs_create_file can return an ERR_PTR for !CONFIG_DEBUG_FS and NULL otherwise, so in case the result is dereferenced there should be a previous IS_ERR and a NULL check. The Coccinelle semantic patch used to find the issue is as follows: @@ expression e; identifier f; @@

[PATCH] drm/amdgpu: Modify error handling

2016-08-04 Thread Amitoj Kaur Chawla
To indicate an error, debugfs_create_file can return an ERR_PTR for !CONFIG_DEBUG_FS and NULL otherwise, so in case the result is dereferenced there should be a previous IS_ERR and a NULL check. The Coccinelle semantic patch used to find the issue is as follows: @@ expression e; identifier f; @@