kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] amdkfd: fix an error handling bug in pqm_create_queue()
@ 2014-11-25 10:24 Dan Carpenter
  2014-11-25 13:15 ` Oded Gabbay
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-11-25 10:24 UTC (permalink / raw)
  To: Oded Gabbay, Ben Goz; +Cc: kernel-janitors, dri-devel

The call to kernel_queue_uninit(NULL) will trigger a BUG(), and also the
error code is incorrect.

Fixes: 45102048f77e ('amdkfd: Add process queue manager module')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
index c7859fc..7ce7a25 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
@@ -208,7 +208,7 @@ int pqm_create_queue(struct process_queue_manager *pqm,
 	case KFD_QUEUE_TYPE_DIQ:
 		kq = kernel_queue_init(dev, KFD_QUEUE_TYPE_DIQ);
 		if (kq = NULL) {
-			kernel_queue_uninit(kq);
+			retval = -ENOMEM;
 			goto err_create_queue;
 		}
 		kq->queue->properties.queue_id = *qid;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] amdkfd: fix an error handling bug in pqm_create_queue()
  2014-11-25 10:24 [patch] amdkfd: fix an error handling bug in pqm_create_queue() Dan Carpenter
@ 2014-11-25 13:15 ` Oded Gabbay
  0 siblings, 0 replies; 2+ messages in thread
From: Oded Gabbay @ 2014-11-25 13:15 UTC (permalink / raw)
  To: Dan Carpenter, Ben Goz; +Cc: kernel-janitors, dri-devel



On 11/25/2014 12:24 PM, Dan Carpenter wrote:
> The call to kernel_queue_uninit(NULL) will trigger a BUG(), and also the
> error code is incorrect.
>
> Fixes: 45102048f77e ('amdkfd: Add process queue manager module')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>

Patch is:
Reviewed-by: Oded Gabbay <oded.gabbay@amd.com>
And applied to my 3.19-next-wip tree.
Thanks!

     Oded

> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
> index c7859fc..7ce7a25 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
> @@ -208,7 +208,7 @@ int pqm_create_queue(struct process_queue_manager *pqm,
>   	case KFD_QUEUE_TYPE_DIQ:
>   		kq = kernel_queue_init(dev, KFD_QUEUE_TYPE_DIQ);
>   		if (kq = NULL) {
> -			kernel_queue_uninit(kq);
> +			retval = -ENOMEM;
>   			goto err_create_queue;
>   		}
>   		kq->queue->properties.queue_id = *qid;
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-25 13:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-25 10:24 [patch] amdkfd: fix an error handling bug in pqm_create_queue() Dan Carpenter
2014-11-25 13:15 ` Oded Gabbay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).