Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: caif: fix erroneous return value

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>

authored by

Anton Protopopov and committed by
David S. Miller
449f14f0 48bb230e

+1 -1
+1 -1
net/caif/cfrfml.c
··· 159 159 tmppkt = NULL; 160 160 161 161 /* Verify that length is correct */ 162 - err = EPROTO; 162 + err = -EPROTO; 163 163 if (rfml->pdu_size != cfpkt_getlen(pkt) - RFM_HEAD_SIZE + 1) 164 164 goto out; 165 165 }