summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_queue.c
diff options
context:
space:
mode:
authorFelix Kuehling2017-08-16 05:00:09 +0200
committerOded Gabbay2017-08-16 05:00:09 +0200
commit4f52f2256eae0b8495c308b78a7edf4094e3dd67 (patch)
treee6bffdeea67f722dea2745d8f12d662c3097218d /drivers/gpu/drm/amd/amdkfd/kfd_queue.c
parentdrm/amdkfd: Remove usage of alloc(sizeof(struct... (diff)
downloadkernel-qcow2-linux-4f52f2256eae0b8495c308b78a7edf4094e3dd67.tar.gz
kernel-qcow2-linux-4f52f2256eae0b8495c308b78a7edf4094e3dd67.tar.xz
kernel-qcow2-linux-4f52f2256eae0b8495c308b78a7edf4094e3dd67.zip
drm/amdkfd: Remove BUG_ONs for NULL pointer arguments
Remove BUG_ONs that check for NULL pointer arguments that are dereferenced in the same function. Dereferencing the NULL pointer will generate a BUG anyway, so the explicit check is redundant and unnecessary overhead. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_queue.c')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_queue.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_queue.c
index 5ad9f6f192ae..a5315d4f1c95 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_queue.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_queue.c
@@ -67,8 +67,6 @@ int init_queue(struct queue **q, const struct queue_properties *properties)
{
struct queue *tmp_q;
- BUG_ON(!q);
-
tmp_q = kzalloc(sizeof(*tmp_q), GFP_KERNEL);
if (!tmp_q)
return -ENOMEM;