diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2017-11-21 13:23:54 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-24 01:33:34 +0900 |
commit | 688703702584dd513b50001bd1eb068655631e9b (patch) | |
tree | 25c45bf458dbffcd8d7a44be84cda22a258fdd6a /net/9p/protocol.h | |
parent | 4e1061f4a2bba1669c7297455c73ddafbebf2b12 (diff) | |
download | linux-688703702584dd513b50001bd1eb068655631e9b.tar.bz2 |
net/smc: Fix preinitialization of buf_desc in __smc_buf_create()
With gcc-4.1.2:
net/smc/smc_core.c: In function ‘__smc_buf_create’:
net/smc/smc_core.c:567: warning: ‘bufsize’ may be used uninitialized in this function
Indeed, if the for-loop is never executed, bufsize is used
uninitialized. In addition, buf_desc is stored for later use, while it
is still a NULL pointer.
Before, error handling was done by checking if buf_desc is non-NULL.
The cleanup changed this to an error check, but forgot to update the
preinitialization of buf_desc to an error pointer.
Update the preinitializatin of buf_desc to fix this.
Fixes: b33982c3a6838d13 ("net/smc: cleanup function __smc_buf_create()")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/9p/protocol.h')
0 files changed, 0 insertions, 0 deletions