hidp20: fix dead code in macro parsing

If rc is positive, it's the number of items.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2017-08-31 09:19:39 +10:00
committed by Benjamin Tissoires
parent 6cdf8a901a
commit 3844a60837

View File

@@ -1611,7 +1611,7 @@ hidpp20_onboard_profiles_parse_macro(struct hidpp20_device *device,
int rc;
rc = hidpp20_onboard_profiles_read_macro(device, page, offset, &macro);
if (rc)
if (rc <= 0)
return rc;
count = rc;