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 <martin@libre.solar>
This commit is contained in:
Martin Jäger 2021-01-02 16:19:30 +01:00 committed by Anas Nashif
commit ade6cc4a71

View file

@ -557,7 +557,7 @@ int isotp_bind(struct isotp_recv_ctx *ctx, const struct device *can_dev,
__ASSERT(ctx, "ctx is NULL");
__ASSERT(can_dev, "CAN device is NULL");
__ASSERT(rx_addr && rx_addr, "RX or TX addr is NULL");
__ASSERT(rx_addr && tx_addr, "RX or TX addr is NULL");
__ASSERT(opts, "OPTS is NULL");
ctx->can_dev = can_dev;
@ -1106,7 +1106,7 @@ static int send(struct isotp_send_ctx *ctx, const struct device *can_dev,
__ASSERT_NO_MSG(ctx);
__ASSERT_NO_MSG(can_dev);
__ASSERT_NO_MSG(rx_addr && rx_addr);
__ASSERT_NO_MSG(rx_addr && tx_addr);
if (complete_cb) {
ctx->fin_cb.cb = complete_cb;