From 3844a608375247ddbaed7aa796d8e9596c760540 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 31 Aug 2017 09:19:39 +1000 Subject: [PATCH] hidp20: fix dead code in macro parsing If rc is positive, it's the number of items. Signed-off-by: Peter Hutterer --- src/hidpp20.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hidpp20.c b/src/hidpp20.c index 21853ceb..3618d116 100644 --- a/src/hidpp20.c +++ b/src/hidpp20.c @@ -1611,7 +1611,7 @@ hidpp20_onboard_profiles_parse_macro(struct hidpp20_device *device, int rc; rc = hidpp20_onboard_profiles_read_macro(device, page, offset, ¯o); - if (rc) + if (rc <= 0) return rc; count = rc;