From 39417c2c0386a971a6973a6aaf779e82c9298020 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 5 Aug 2015 15:14:41 +0200 Subject: Fix error-checking typo in kmem --- pcilib/kmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pcilib') diff --git a/pcilib/kmem.c b/pcilib/kmem.c index 2ff674f..469c63a 100644 --- a/pcilib/kmem.c +++ b/pcilib/kmem.c @@ -81,8 +81,8 @@ pcilib_kmem_handle_t *pcilib_alloc_kernel_memory(pcilib_t *ctx, pcilib_kmem_type memset(kbuf, 0, sizeof(pcilib_kmem_list_t) + nmemb * sizeof(pcilib_kmem_addr_t)); err = pcilib_lock(ctx->locks.mmap); - if (!err) { - pcilib_error("Error acquiring mmap lock"); + if (err) { + pcilib_error("Error (%i) acquiring mmap lock", err); return NULL; } -- cgit v1.2.3