Diff between 31505cf155cb0c19a732b537a066b1c65c262a23 and d17cf9905f436a1b38ff2248aa5279c1188b73fc

Changed Files

File Additions Deletions Status
android/avctp.c +2 -2 modified
profiles/audio/avctp.c +2 -2 modified

Full Patch

diff --git a/android/avctp.c b/android/avctp.c
index abf9449..9232cfa 100644
--- a/android/avctp.c
+++ b/android/avctp.c
@@ -322,7 +322,7 @@ static ssize_t handle_panel_passthrough(struct avctp *session,
 
 	if (*code != AVC_CTYPE_CONTROL || *subunit != AVC_SUBUNIT_PANEL) {
 		*code = AVC_CTYPE_REJECTED;
-		return 0;
+		return operand_count;
 	}
 
 	if (operand_count == 0)
@@ -394,7 +394,7 @@ static ssize_t handle_panel_passthrough(struct avctp *session,
 		DBG("AV/C: unknown button 0x%02X %s",
 						operands[0] & 0x7F, status);
 		*code = AVC_CTYPE_NOT_IMPLEMENTED;
-		return 0;
+		return operand_count;
 	}
 
 done:
diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 28c7685..f88e634 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -342,7 +342,7 @@ static size_t handle_panel_passthrough(struct avctp *session,
 
 	if (*code != AVC_CTYPE_CONTROL || *subunit != AVC_SUBUNIT_PANEL) {
 		*code = AVC_CTYPE_REJECTED;
-		return 0;
+		return operand_count;
 	}
 
 	if (operand_count == 0)
@@ -408,7 +408,7 @@ static size_t handle_panel_passthrough(struct avctp *session,
 		DBG("AV/C: unknown button 0x%02X %s",
 						operands[0] & 0x7F, status);
 		*code = AVC_CTYPE_NOT_IMPLEMENTED;
-		return 0;
+		return operand_count;
 	}
 
 done: