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:
Родитель
e13647c158
Коммит
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче