projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61849dd
)
ath6kl: Stop using NLA_PUT*().
author
David S. Miller
<
[email protected]
>
Mon, 2 Apr 2012 01:02:53 +0000
(21:02 -0400)
committer
David S. Miller
<
[email protected]
>
Mon, 2 Apr 2012 08:33:44 +0000
(
04:33
-0400)
These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/wireless/ath/ath6kl/testmode.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/ath/ath6kl/testmode.c
b/drivers/net/wireless/ath/ath6kl/testmode.c
index 6675c92b542b4fca19c4af6d1ebd96e6586f046b..acc9aa832f764df7512165f4b1c4b4e9a3050416 100644
(file)
--- a/
drivers/net/wireless/ath/ath6kl/testmode.c
+++ b/
drivers/net/wireless/ath/ath6kl/testmode.c
@@
-55,8
+55,9
@@
void ath6kl_tm_rx_event(struct ath6kl *ar, void *buf, size_t buf_len)
ath6kl_warn("failed to allocate testmode rx skb!\n");
return;
}
- NLA_PUT_U32(skb, ATH6KL_TM_ATTR_CMD, ATH6KL_TM_CMD_TCMD);
- NLA_PUT(skb, ATH6KL_TM_ATTR_DATA, buf_len, buf);
+ if (nla_put_u32(skb, ATH6KL_TM_ATTR_CMD, ATH6KL_TM_CMD_TCMD) ||
+ nla_put(skb, ATH6KL_TM_ATTR_DATA, buf_len, buf))
+ goto nla_put_failure;
cfg80211_testmode_event(skb, GFP_KERNEL);
return;