lkml.org 
[lkml]   [2017]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] VME: Return -EBUSY when DMA list in use
Date
From: Martyn Welch <martyn@welchs.me.uk>

The VME subsystem currently returns -EBUSY when trying to free a DMA
resource that is busy, but returns -EINVAL when trying to free a DMA list
that is in use. Switch to returning -EBUSY when trying to free a DMA list
that is in use for consistency and correctness.

Signed-off-by: Martyn Welch <martyn@welchs.me.uk>
---
drivers/vme/vme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vme/vme.c b/drivers/vme/vme.c
index d0ce50d56019..81246221a13b 100644
--- a/drivers/vme/vme.c
+++ b/drivers/vme/vme.c
@@ -1194,7 +1194,7 @@ int vme_dma_list_free(struct vme_dma_list *list)

if (!mutex_trylock(&list->mtx)) {
printk(KERN_ERR "Link List in use\n");
- return -EINVAL;
+ return -EBUSY;
}

/*
--
2.11.0
\
 
 \ /
  Last update: 2017-10-24 08:28    [W:0.221 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site