Commit 2d9b36f9 authored by Felix Kuehling's avatar Felix Kuehling Committed by Oded Gabbay

drm/amdkfd: Reduce nesting in kfd_create_process_device_data

Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
parent 82c16b42
...@@ -390,17 +390,18 @@ struct kfd_process_device *kfd_create_process_device_data(struct kfd_dev *dev, ...@@ -390,17 +390,18 @@ struct kfd_process_device *kfd_create_process_device_data(struct kfd_dev *dev,
struct kfd_process_device *pdd = NULL; struct kfd_process_device *pdd = NULL;
pdd = kzalloc(sizeof(*pdd), GFP_KERNEL); pdd = kzalloc(sizeof(*pdd), GFP_KERNEL);
if (pdd != NULL) { if (!pdd)
pdd->dev = dev; return NULL;
INIT_LIST_HEAD(&pdd->qpd.queues_list);
INIT_LIST_HEAD(&pdd->qpd.priv_queue_list); pdd->dev = dev;
pdd->qpd.dqm = dev->dqm; INIT_LIST_HEAD(&pdd->qpd.queues_list);
pdd->qpd.pqm = &p->pqm; INIT_LIST_HEAD(&pdd->qpd.priv_queue_list);
pdd->process = p; pdd->qpd.dqm = dev->dqm;
pdd->bound = PDD_UNBOUND; pdd->qpd.pqm = &p->pqm;
pdd->already_dequeued = false; pdd->process = p;
list_add(&pdd->per_device_list, &p->per_device_data); pdd->bound = PDD_UNBOUND;
} pdd->already_dequeued = false;
list_add(&pdd->per_device_list, &p->per_device_data);
return pdd; return pdd;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment