From 6b119e60f527dcba241ec3d47f5cd17555bcf194 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Wed, 29 Mar 2017 11:33:40 +0300 Subject: [PATCH] xpp: remove useless sanity check of len field The packet data length field may have other values in some cases (BRI D channel). It is also inherently limited to 3 bits. Signed-off-by: Tzafrir Cohen --- drivers/dahdi/xpp/card_global.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/dahdi/xpp/card_global.c b/drivers/dahdi/xpp/card_global.c index 3828c49..809ee76 100644 --- a/drivers/dahdi/xpp/card_global.c +++ b/drivers/dahdi/xpp/card_global.c @@ -696,13 +696,7 @@ HANDLER_DEF(GLOBAL, REGISTER_REPLY) "REGISTER_REPLY: missing card_register_reply()\n"); return -EINVAL; } - switch (reg->h.bytes) { - case REG_CMD_SIZE(REG): - case REG_CMD_SIZE(RAM): - return CALL_XMETHOD(card_register_reply, xpd, reg); - } - XPD_ERR(xpd, "REGISTER_REPLY: bad packet_len=%d\n", pack->head.packet_len); - return -EINVAL; + return CALL_XMETHOD(card_register_reply, xpd, reg); } HANDLER_DEF(GLOBAL, SYNC_REPLY)