diff options
author | Ravikant B Sharma <ravikant.s2@samsung.com> | 2016-11-08 11:19:42 +0530 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-11-11 10:21:07 -0500 |
commit | 3f12325ab8dc3a35f77eaf0155bd6d6e78f67e9c (patch) | |
tree | 02375dd3c54bbd6532fea6a7b86abaf3f32c92c1 /drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | |
parent | bc24fbe9df6623500ad1fab92e71265d4cb7fa2a (diff) | |
download | linux-3f12325ab8dc3a35f77eaf0155bd6d6e78f67e9c.tar.bz2 |
drm/amd/amdgpu : Fix NULL pointer comparison
Replace direct comparisons to NULL i.e.
'x == NULL' with '!x'. As per coding standard.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Ravikant B Sharma <ravikant.s2@samsung.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index 1ac88b1fb1a1..ab84bff18727 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c @@ -3904,7 +3904,7 @@ static int gfx_v8_0_init_save_restore_list(struct amdgpu_device *adev) int list_size; unsigned int *register_list_format = kmalloc(adev->gfx.rlc.reg_list_format_size_bytes, GFP_KERNEL); - if (register_list_format == NULL) + if (!register_list_format) return -ENOMEM; memcpy(register_list_format, adev->gfx.rlc.register_list_format, adev->gfx.rlc.reg_list_format_size_bytes); |