mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-23 17:02:06 -04:00
drm/amdgpu: remove useless BUG_ONs
Dereferencing NULL pointers will cause a BUG anyway. No need to do an explicit check. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
This commit is contained in:
committed by
Oded Gabbay
parent
30d13424fb
commit
fa72d66198
@@ -212,10 +212,6 @@ int alloc_gtt_mem(struct kgd_dev *kgd, size_t size,
|
||||
struct kgd_mem **mem = (struct kgd_mem **) mem_obj;
|
||||
int r;
|
||||
|
||||
BUG_ON(kgd == NULL);
|
||||
BUG_ON(gpu_addr == NULL);
|
||||
BUG_ON(cpu_ptr == NULL);
|
||||
|
||||
*mem = kmalloc(sizeof(struct kgd_mem), GFP_KERNEL);
|
||||
if ((*mem) == NULL)
|
||||
return -ENOMEM;
|
||||
@@ -269,8 +265,6 @@ void free_gtt_mem(struct kgd_dev *kgd, void *mem_obj)
|
||||
{
|
||||
struct kgd_mem *mem = (struct kgd_mem *) mem_obj;
|
||||
|
||||
BUG_ON(mem == NULL);
|
||||
|
||||
amdgpu_bo_reserve(mem->bo, true);
|
||||
amdgpu_bo_kunmap(mem->bo);
|
||||
amdgpu_bo_unpin(mem->bo);
|
||||
|
||||
Reference in New Issue
Block a user