diff options
author | Paul Moore <paul.moore@hp.com> | 2008-10-10 10:16:29 -0400 |
---|---|---|
committer | Paul Moore <paul.moore@hp.com> | 2008-10-10 10:16:29 -0400 |
commit | 561967010edef40f539dacf2aa125e20773ab40b (patch) | |
tree | 90532a13377f81e213bc6904a29762866d34b68e /net/netlabel/netlabel_cipso_v4.c | |
parent | 3fa8749e584b55f1180411ab1b51117190bac1e5 (diff) |
netlabel: Fix some sparse warnings
Fix a few sparse warnings. One dealt with a RCU lock being held on error,
another dealt with an improper type caused by a signed/unsigned mixup while
the rest appeared to be caused by using rcu_dereference() in a
list_for_each_entry_rcu() call. The latter probably isn't a big deal, but
I derive a certain pleasure from knowing that the net/netlabel is nice and
clean.
Thanks to James Morris for pointing out the issues and demonstrating how
to run sparse.
Signed-off-by: Paul Moore <paul.moore@hp.com>
Diffstat (limited to 'net/netlabel/netlabel_cipso_v4.c')
-rw-r--r-- | net/netlabel/netlabel_cipso_v4.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netlabel/netlabel_cipso_v4.c b/net/netlabel/netlabel_cipso_v4.c index 0aec318bf0ef..aaf50032b3ac 100644 --- a/net/netlabel/netlabel_cipso_v4.c +++ b/net/netlabel/netlabel_cipso_v4.c | |||
@@ -491,7 +491,7 @@ list_start: | |||
491 | doi_def = cipso_v4_doi_getdef(doi); | 491 | doi_def = cipso_v4_doi_getdef(doi); |
492 | if (doi_def == NULL) { | 492 | if (doi_def == NULL) { |
493 | ret_val = -EINVAL; | 493 | ret_val = -EINVAL; |
494 | goto list_failure; | 494 | goto list_failure_lock; |
495 | } | 495 | } |
496 | 496 | ||
497 | ret_val = nla_put_u32(ans_skb, NLBL_CIPSOV4_A_MTYPE, doi_def->type); | 497 | ret_val = nla_put_u32(ans_skb, NLBL_CIPSOV4_A_MTYPE, doi_def->type); |
@@ -655,7 +655,7 @@ static int netlbl_cipsov4_listall(struct sk_buff *skb, | |||
655 | struct netlink_callback *cb) | 655 | struct netlink_callback *cb) |
656 | { | 656 | { |
657 | struct netlbl_cipsov4_doiwalk_arg cb_arg; | 657 | struct netlbl_cipsov4_doiwalk_arg cb_arg; |
658 | int doi_skip = cb->args[0]; | 658 | u32 doi_skip = cb->args[0]; |
659 | 659 | ||
660 | cb_arg.nl_cb = cb; | 660 | cb_arg.nl_cb = cb; |
661 | cb_arg.skb = skb; | 661 | cb_arg.skb = skb; |