From: Anton Protopopov Date: Wed, 17 Feb 2016 15:54:13 +0000 (-0500) Subject: net: caif: fix erroneous return value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=449f14f01f65f45f332e3360aa46b3d3571b2cba;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git net: caif: fix erroneous return value The cfrfml_receive() function might return positive value EPROTO Signed-off-by: Anton Protopopov Signed-off-by: David S. Miller --- diff --git a/net/caif/cfrfml.c b/net/caif/cfrfml.c index 61d7617d9249..b82440e1fcb4 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; }