From f3679bc8e76532237d9e560534ce70ab752beca1 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Tue, 9 Feb 2016 14:42:40 +0100 Subject: [PATCH] hidpp20: fix return value of hidpp20_onboard_profiles_write() data is a uint8_t*, so its size could never be 256, the size of the profile. Signed-off-by: Benjamin Tissoires --- src/hidpp20.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hidpp20.c b/src/hidpp20.c index 464818dd..19e7ab33 100644 --- a/src/hidpp20.c +++ b/src/hidpp20.c @@ -1645,7 +1645,7 @@ int hidpp20_onboard_profiles_write(struct hidpp20_device *device, if (rc < 0) return rc; - if (rc != sizeof(data)) + if (rc != sizeof(pdata.data)) return -EIO; return 0;