mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
caif: fix a couple range checks
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>
This commit is contained in:
parent
e13647c158
commit
aea34e7ae7
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user