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 61d7617..b82440e 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;
        }