]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/amdgpu/amdgpu_ttm: Handle return NULL error from ioremap_nocache
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 24 Jan 2017 09:25:33 +0000 (14:55 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 27 Jan 2017 17:20:38 +0000 (12:20 -0500)
commit582021042a6c0fb6d2affdda1677ddbda5a31eae
tree68aff7e691359fc5db0d797c4bcd1d7cca6de0f6
parent14c1bd4fc0c3139865a9c8ccf21310d39892d850
drm/amd/amdgpu/amdgpu_ttm: Handle return NULL error from ioremap_nocache

Here, If ioremap_nocache will fail. It will return NULL.
Kernel can run into a NULL-pointer dereference.
This error check will avoid NULL pointer dereference.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c