[PATCH] net: caif: fix erroneous return value

Subsystems: networking [general], the rest

STALE3823d

2 messages, 2 authors, 2016-02-18 · open the first message on its own page

[PATCH] net: caif: fix erroneous return value

From: Anton Protopopov <hidden>
Date: 2016-02-17 15:54:23

The cfrfml_receive() function might return positive value EPROTO

Signed-off-by: Anton Protopopov <redacted>
---
 net/caif/cfrfml.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/caif/cfrfml.c b/net/caif/cfrfml.c
index 61d7617..b82440e 100644
--- a/net/caif/cfrfml.c
+++ b/net/caif/cfrfml.c
@@ -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;
 	}
-- 
2.6.5

Re: [PATCH] net: caif: fix erroneous return value

From: David Miller <davem@davemloft.net>
Date: 2016-02-18 20:00:03

From: Anton Protopopov <redacted>
Date: Wed, 17 Feb 2016 10:54:13 -0500
The cfrfml_receive() function might return positive value EPROTO

Signed-off-by: Anton Protopopov <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help