net: caif: fix erroneous return value
authorAnton Protopopov <a.s.protopopov@gmail.com>
Wed, 17 Feb 2016 15:54:13 +0000 (10:54 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Feb 2016 19:59:35 +0000 (14:59 -0500)
The cfrfml_receive() function might return positive value EPROTO

Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/caif/cfrfml.c

index 61d7617d924912347325a5db483172794e6df33a..b82440e1fcb4f3fe8a25e121416360cc23f8fada 100644 (file)
@@ -159,7 +159,7 @@ static int cfrfml_receive(struct cflayer *layr, struct cfpkt *pkt)
                tmppkt = NULL;
 
                /* Verify that length is correct */
-               err = EPROTO;
+               err = -EPROTO;
                if (rfml->pdu_size != cfpkt_getlen(pkt) - RFM_HEAD_SIZE + 1)
                        goto out;
        }