mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
6lowpan: fix error checking code
Bool variable 'fail' is always non-negative, it indicates an error if it is true. The problem has been detected using coccinelle script scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci Signed-off-by: Andrzej Hajda <[email protected]> Acked-by: Alexander Aring <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
This commit is contained in:
parent
8790404de0
commit
4c23d87457
1 changed files with 1 additions and 1 deletions
|
|
@ -482,7 +482,7 @@ static int lowpan_uncompress_multicast_ctx_daddr(struct sk_buff *skb,
|
|||
ipaddr->s6_addr[0] = 0xFF;
|
||||
fail = lowpan_fetch_skb(skb, &ipaddr->s6_addr[1], 2);
|
||||
fail |= lowpan_fetch_skb(skb, &ipaddr->s6_addr[12], 4);
|
||||
if (fail < 0)
|
||||
if (fail)
|
||||
return -EIO;
|
||||
|
||||
/* take prefix_len and network prefix from the context */
|
||||
|
|
|
|||
Loading…
Reference in a new issue