From dde6af06e2b89101d279212b76b69a51f981df8b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 27 Jul 2022 11:22:59 +1000 Subject: [PATCH] reis: fix return code handling in allow_capabilities send_msg() returns zero on success or a negative errno otherwise. --- src/libreis.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libreis.c b/src/libreis.c index d9164e5..3cf2ab1 100644 --- a/src/libreis.c +++ b/src/libreis.c @@ -134,8 +134,5 @@ reis_allow_capability(struct reis *reis, enum reis_device_capability capability, configure_capabilities.allowed_capabilities = caps; int rc = send_msg(reis->eisfd, &msg); - if (rc) - return rc; - - return -EINVAL; + return rc; }