]> git.baikalelectronics.ru Git - kernel.git/commit
openprom: fix warning
authorSam Ravnborg <sam@ravnborg.org>
Sun, 24 Apr 2016 13:24:33 +0000 (15:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 May 2016 01:33:37 +0000 (18:33 -0700)
commit84dcf547a4c2575750b275c067b3816da09addb2
tree19b28389dd9131ed2ba73816b5d6978856a96b83
parent9164a50e04073c8af94adaa17ec3f74a998cea33
openprom: fix warning

Fix following warnings:
openprom.c:510:2: warning: 'tmp' may be used uninitialized in this function [-Wmaybe-uninitialized]
openprom.c:503:3: warning: 'str' may be used uninitialized in this function [-Wmaybe-uninitialized]
openprom.c:459:8: warning: 'str' may be used uninitialized in this function [-Wmaybe-uninitialized]
openprom.c:422:7: warning: 'str' may be used uninitialized in this function [-Wmaybe-uninitialized]

Fixed by introducing PTR_ERR etc.
This simplified the code as a nice side effect.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/sbus/char/openprom.c