Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

drm/amdkfd: Reduce nesting in kfd_create_process_device_data

parent 82c16b42
Loading
Loading
Loading
Loading
+12 −11
Original line number Original line Diff line number Diff line
@@ -390,7 +390,9 @@ 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)
		return NULL;

	pdd->dev = dev;
	pdd->dev = dev;
	INIT_LIST_HEAD(&pdd->qpd.queues_list);
	INIT_LIST_HEAD(&pdd->qpd.queues_list);
	INIT_LIST_HEAD(&pdd->qpd.priv_queue_list);
	INIT_LIST_HEAD(&pdd->qpd.priv_queue_list);
@@ -400,7 +402,6 @@ struct kfd_process_device *kfd_create_process_device_data(struct kfd_dev *dev,
	pdd->bound = PDD_UNBOUND;
	pdd->bound = PDD_UNBOUND;
	pdd->already_dequeued = false;
	pdd->already_dequeued = false;
	list_add(&pdd->per_device_list, &p->per_device_data);
	list_add(&pdd->per_device_list, &p->per_device_data);
	}


	return pdd;
	return pdd;
}
}