summaryrefslogtreecommitdiff
path: root/lib/nlattr.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2020-08-25 06:25:17 +0300
committerDavid S. Miller <davem@davemloft.net>2020-08-25 16:06:19 +0300
commit4718a471f1a7fc5cc943377c09300bb35138daf9 (patch)
tree58795cad83d364e4b93fe75008ac7504fadeff03 /lib/nlattr.c
parent8b4510d76cde3c6934d4caed2fe897bd831cdb82 (diff)
downloadlinux-4718a471f1a7fc5cc943377c09300bb35138daf9.tar.xz
netlink: remove duplicated nla_need_padding_for_64bit() check
The need for padding 64bit is implicitly checked by nla_align_64bit(), so remove this explicit one. Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/nlattr.c')
-rw-r--r--lib/nlattr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/nlattr.c b/lib/nlattr.c
index 665bdaff02c8..80ff9fe83696 100644
--- a/lib/nlattr.c
+++ b/lib/nlattr.c
@@ -834,8 +834,7 @@ EXPORT_SYMBOL(__nla_reserve);
struct nlattr *__nla_reserve_64bit(struct sk_buff *skb, int attrtype,
int attrlen, int padattr)
{
- if (nla_need_padding_for_64bit(skb))
- nla_align_64bit(skb, padattr);
+ nla_align_64bit(skb, padattr);
return __nla_reserve(skb, attrtype, attrlen);
}