Skip to content

Commit ade6cc4

Browse files
martinjaegernashif
authored andcommitted
canbus: isotp: fix asserts to check rx and tx addr
Previous implementation contained a typo so that only the rx address was checked. Signed-off-by: Martin Jäger <[email protected]>
1 parent b6fd177 commit ade6cc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

subsys/canbus/isotp/isotp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ int isotp_bind(struct isotp_recv_ctx *ctx, const struct device *can_dev,
557557

558558
__ASSERT(ctx, "ctx is NULL");
559559
__ASSERT(can_dev, "CAN device is NULL");
560-
__ASSERT(rx_addr && rx_addr, "RX or TX addr is NULL");
560+
__ASSERT(rx_addr && tx_addr, "RX or TX addr is NULL");
561561
__ASSERT(opts, "OPTS is NULL");
562562

563563
ctx->can_dev = can_dev;
@@ -1106,7 +1106,7 @@ static int send(struct isotp_send_ctx *ctx, const struct device *can_dev,
11061106

11071107
__ASSERT_NO_MSG(ctx);
11081108
__ASSERT_NO_MSG(can_dev);
1109-
__ASSERT_NO_MSG(rx_addr && rx_addr);
1109+
__ASSERT_NO_MSG(rx_addr && tx_addr);
11101110

11111111
if (complete_cb) {
11121112
ctx->fin_cb.cb = complete_cb;

0 commit comments

Comments
 (0)