--- audio/avrcp.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/audio/avrcp.c b/audio/avrcp.c index ea175e3..0d9b6d0 100644 --- a/audio/avrcp.c +++ b/audio/avrcp.c @@ -565,11 +565,10 @@ static uint8_t avrcp_handle_list_player_values(struct avrcp_player *player, if (len != 1 || !player) goto err; - len = attr_get_max_val(pdu->params[0]); - if (!len) { - error("Attribute is invalid: %u", pdu->params[0]); + if (player_get_attribute(player, pdu->params[0]) < 0) goto err; - } + + len = attr_get_max_val(pdu->params[0]); for (i = 1; i <= len; i++) pdu->params[i] = i; -- 1.7.7 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html