Skip to content

Commit 1610aa0

Browse files
moonlight83340dkalowsk
authored andcommitted
bluetooth: host: a2dp: remove redundant null check
Remove duplicated check for 'ep->stream == NULL' to clean up conditionals and avoid unnecessary repeated evaluations. This cleans up the code and avoids unnecessary repeated condition evaluation. Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
1 parent 41ef8c3 commit 1610aa0

File tree

1 file changed

+0
-3
lines changed
  • subsys/bluetooth/host/classic

1 file changed

+0
-3
lines changed

subsys/bluetooth/host/classic/a2dp.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,6 @@ static int bt_a2dp_set_config_cb(struct bt_avdtp_req *req, struct net_buf *buf)
401401
struct bt_a2dp_stream_ops *ops;
402402

403403
ep = CONTAINER_OF(a2dp->set_config_param.sep, struct bt_a2dp_ep, sep);
404-
if (ep->stream == NULL) {
405-
return -EINVAL;
406-
}
407404

408405
if ((ep->stream == NULL) || (SET_CONF_REQ(req) != &a2dp->set_config_param)) {
409406
return -EINVAL;

0 commit comments

Comments
 (0)