From: Dan Carpenter Date: Thu, 22 Jul 2010 01:11:31 +0000 (+0000) Subject: caif: precedence bug X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b77026b391f4f43ca148cf6c55a93f7487ff6ed8;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git caif: precedence bug Negate has precedence over comparison so the original assert only checked that "rfml->fragment_size" was larger than 1 or 0. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller --- diff --git a/net/caif/cfrfml.c b/net/caif/cfrfml.c index 4b04d25b6a3f..eb1602022ac0 100644 --- a/net/caif/cfrfml.c +++ b/net/caif/cfrfml.c @@ -193,7 +193,7 @@ out: static int cfrfml_transmit_segment(struct cfrfml *rfml, struct cfpkt *pkt) { - caif_assert(!cfpkt_getlen(pkt) < rfml->fragment_size); + caif_assert(cfpkt_getlen(pkt) >= rfml->fragment_size); /* Add info for MUX-layer to route the packet out. */ cfpkt_info(pkt)->channel_id = rfml->serv.layer.id;