bletiny: Add missing returns in L2CAP connect/disconnect
Fix missing error returns.
@@ -1226,6 +1226,7 @@ cmd_l2cap_connect(int argc, char **argv)
if (rc != 0) {
console_printf("invalid 'conn' parameter\n");
help_cmd_uint16("conn");
+ return rc;
}
psm = parse_arg_uint16("psm", &rc);
@@ -1265,13 +1266,14 @@ cmd_l2cap_disconnect(int argc, char **argv)
if (rc != 0) {
console_printf("invalid 'conn' parameter\n");
help_cmd_uint16("conn");
+ return rc;
}
idx = parse_arg_uint16("idx", &rc);
if (rc != 0) {
console_printf("invalid 'idx' parameter\n");
help_cmd_uint16("idx");
- return 0;
+ return rc;
}
return bletiny_l2cap_disconnect(conn, idx);
