diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-08-29 08:49:12 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-31 22:27:48 +0200 |
commit | 48f125ce1cc3ff275f9587b5bf56bf0f90766c7d (patch) | |
tree | 40cc8210126cdb67afffff0b18bf9b82e089cc4e /net/batman-adv/bridge_loop_avoidance.h | |
parent | net: qmi_wwan: new device: Foxconn/Novatel E396 (diff) | |
download | linux-48f125ce1cc3ff275f9587b5bf56bf0f90766c7d.tar.xz linux-48f125ce1cc3ff275f9587b5bf56bf0f90766c7d.zip |
net: ipv6: fix error return code
Initialize return variable before exiting on an error path.
The initial initialization of the return variable is also dropped, because
that value is never used.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/batman-adv/bridge_loop_avoidance.h')
0 files changed, 0 insertions, 0 deletions