Skip to content

Commit

Permalink
caif: fix a couple range checks
Browse files Browse the repository at this point in the history
The extra ! character means that these conditions are always false.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Jun 9, 2010
1 parent e13647c commit aea34e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/caif/cfrfml.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static int cfrfml_transmit(struct cflayer *layr, struct cfpkt *pkt)
if (!cfsrvl_ready(service, &ret))
return ret;

if (!cfpkt_getlen(pkt) > CAIF_MAX_PAYLOAD_SIZE) {
if (cfpkt_getlen(pkt) > CAIF_MAX_PAYLOAD_SIZE) {
pr_err("CAIF: %s():Packet too large - size=%d\n",
__func__, cfpkt_getlen(pkt));
return -EOVERFLOW;
Expand Down
2 changes: 1 addition & 1 deletion net/caif/cfveil.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static int cfvei_transmit(struct cflayer *layr, struct cfpkt *pkt)
return ret;
caif_assert(layr->dn != NULL);
caif_assert(layr->dn->transmit != NULL);
if (!cfpkt_getlen(pkt) > CAIF_MAX_PAYLOAD_SIZE) {
if (cfpkt_getlen(pkt) > CAIF_MAX_PAYLOAD_SIZE) {
pr_warning("CAIF: %s(): Packet too large - size=%d\n",
__func__, cfpkt_getlen(pkt));
return -EOVERFLOW;
Expand Down

0 comments on commit aea34e7

Please sign in to comment.