From: Martyn Welch <martyn.welch@xxxxxxxxxxx> Fix incorrect use of mutex_trylock(). Signed-off-by: Martyn Welch <martyn.welch@xxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> --- drivers/staging/vme/vme.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c index ca9e4de..994fdb9 100644 --- a/drivers/staging/vme/vme.c +++ b/drivers/staging/vme/vme.c @@ -879,7 +879,7 @@ int vme_dma_list_add(struct vme_dma_list *list, struct vme_dma_attr *src, return -EINVAL; } - if (mutex_trylock(&(list->mtx))) { + if (!mutex_trylock(&(list->mtx))) { printk("Link List already submitted\n"); return -EINVAL; } @@ -922,7 +922,7 @@ int vme_dma_list_free(struct vme_dma_list *list) return -EINVAL; } - if (mutex_trylock(&(list->mtx))) { + if (!mutex_trylock(&(list->mtx))) { printk("Link List in use\n"); return -EINVAL; } @@ -955,7 +955,7 @@ int vme_dma_free(struct vme_resource *resource) ctrlr = list_entry(resource->entry, struct vme_dma_resource, list); - if (mutex_trylock(&(ctrlr->mtx))) { + if (!mutex_trylock(&(ctrlr->mtx))) { printk("Resource busy, can't free\n"); return -EBUSY; } -- 1.6.5.5 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel