From 3277f3acfb486c2fa11eb583a759fef4dd3f0b23 Mon Sep 17 00:00:00 2001 From: zuozhiwei Date: Wed, 15 Apr 2026 17:09:51 +0800 Subject: [PATCH] alsa: fix inverted port validity check in port_reuse_buffer The CHECK_PORT condition in impl_node_port_reuse_buffer was inverted with a negation operator, causing the function to reject valid output ports and accept invalid ones. Fixes the logic so that valid ports proceed to buffer recycling and invalid ports are properly rejected. --- spa/plugins/alsa/alsa-seq-bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/alsa/alsa-seq-bridge.c b/spa/plugins/alsa/alsa-seq-bridge.c index 63945e003..7c887c573 100644 --- a/spa/plugins/alsa/alsa-seq-bridge.c +++ b/spa/plugins/alsa/alsa-seq-bridge.c @@ -857,7 +857,7 @@ static int impl_node_port_reuse_buffer(void *object, uint32_t port_id, uint32_t spa_return_val_if_fail(this != NULL, -EINVAL); - spa_return_val_if_fail(!CHECK_PORT(this, SPA_DIRECTION_OUTPUT, port_id), -EINVAL); + spa_return_val_if_fail(CHECK_PORT(this, SPA_DIRECTION_OUTPUT, port_id), -EINVAL); port = GET_PORT(this, SPA_DIRECTION_OUTPUT, port_id);