Skip to content

Commit 6d3a4c4

Browse files
geertudavem330
authored andcommitted
strparser: Propagate correct error code in strp_recv()
With m68k-linux-gnu-gcc-4.1: net/strparser/strparser.c: In function ‘strp_recv’: net/strparser/strparser.c:98: warning: ‘err’ may be used uninitialized in this function Pass "len" (which is an error code when negative) instead of the uninitialized "err" variable to fix this. Fixes: 43a0c67 ("strparser: Stream parser for messages") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 6b25e21 commit 6d3a4c4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/strparser/strparser.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static int strp_recv(read_descriptor_t *desc, struct sk_buff *orig_skb,
246246
} else {
247247
strp->rx_interrupted = 1;
248248
}
249-
strp_parser_err(strp, err, desc);
249+
strp_parser_err(strp, len, desc);
250250
break;
251251
} else if (len > strp->sk->sk_rcvbuf) {
252252
/* Message length exceeds maximum allowed */

0 commit comments

Comments
 (0)