diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/genl_magic_func.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/genl_magic_func.h b/include/linux/genl_magic_func.h index 58edd403a3ff..357f2ad403b1 100644 --- a/include/linux/genl_magic_func.h +++ b/include/linux/genl_magic_func.h | |||
@@ -158,9 +158,9 @@ static inline int drbd_nla_check_mandatory(int maxtype, struct nlattr *nla) | |||
158 | 158 | ||
159 | nla_for_each_attr(nla, head, len, rem) { | 159 | nla_for_each_attr(nla, head, len, rem) { |
160 | if (nla->nla_type & DRBD_GENLA_F_MANDATORY) { | 160 | if (nla->nla_type & DRBD_GENLA_F_MANDATORY) { |
161 | nla->nla_type &= ~DRBD_GENLA_F_MANDATORY; | ||
161 | if (nla_type(nla) > maxtype) | 162 | if (nla_type(nla) > maxtype) |
162 | return -EOPNOTSUPP; | 163 | return -EOPNOTSUPP; |
163 | nla->nla_type &= ~DRBD_GENLA_F_MANDATORY; | ||
164 | } | 164 | } |
165 | } | 165 | } |
166 | return 0; | 166 | return 0; |