VME: Return -EBUSY when DMA list in use
authorMartyn Welch <martyn@welchs.me.uk>
Tue, 24 Oct 2017 06:27:40 +0000 (08:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2017 13:26:50 +0000 (14:26 +0100)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vme/vme.c

index d0ce50d560193b5d3970422253814a6b670ea84b..81246221a13ba7f2eadd9c8b0455b18bbfca78c1 100644 (file)
@@ -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;
        }
 
        /*