Fix posix_memalign() return value in case of error

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/helpers.c b/helpers.c
index 987f5b6..ba5c654 100644
--- a/helpers.c
+++ b/helpers.c
@@ -6,7 +6,10 @@
 int __weak posix_memalign(void **ptr, size_t align, size_t size)
 {
 	*ptr = memalign(align, size);
-	return *ptr == NULL;
+	if (*ptr)
+		return 0;
+
+	return ENOMEM;
 }
 
 int __weak posix_fallocate(int fd, off_t offset, off_t len)