Skip to content

Commit fefbb28

Browse files
fredrikdanebjerjhedberg
authored andcommitted
Bluetooth: Audio: Fix return code in PACS notify
Fix errenous return value in pacs_gatt_notify function. The function would always return zero, and not forward the error correctly. Signed-off-by: Fredrik Danebjer <[email protected]>
1 parent df23b01 commit fefbb28

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

subsys/bluetooth/audio/pacs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -795,11 +795,11 @@ static int pacs_gatt_notify(struct bt_conn *conn,
795795
atomic_clear(&notify_rdy);
796796
}
797797

798-
if (err == -ENOTCONN) {
799-
return 0;
800-
} else {
801-
return 0;
798+
if (err && err != -ENOTCONN) {
799+
return err;
802800
}
801+
802+
return 0;
803803
}
804804

805805
static void notify_cb(struct bt_conn *conn, void *data)

0 commit comments

Comments
 (0)