]> git.baikalelectronics.ru Git - kernel.git/commit
strparser: Propagate correct error code in strp_recv()
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 6 Oct 2016 13:41:49 +0000 (15:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Oct 2016 05:51:49 +0000 (01:51 -0400)
commit29c606bfa4951288bb308e9b6de54a3bacf9f0b6
tree3f99b17ecba4fc4c7d35fb786e524d20134fcea9
parent0d5a2c6d0bd23c50bf6c399f093244c017d07f80
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: df874f1b4597e9e5 ("strparser: Stream parser for messages")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/strparser/strparser.c