aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee802154/nl-phy.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ieee802154/nl-phy.c')
-rw-r--r--net/ieee802154/nl-phy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ieee802154/nl-phy.c b/net/ieee802154/nl-phy.c
index d08c7a43dcd1..89b265aea151 100644
--- a/net/ieee802154/nl-phy.c
+++ b/net/ieee802154/nl-phy.c
@@ -221,8 +221,10 @@ int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info)
221 221
222 if (info->attrs[IEEE802154_ATTR_DEV_TYPE]) { 222 if (info->attrs[IEEE802154_ATTR_DEV_TYPE]) {
223 type = nla_get_u8(info->attrs[IEEE802154_ATTR_DEV_TYPE]); 223 type = nla_get_u8(info->attrs[IEEE802154_ATTR_DEV_TYPE]);
224 if (type >= __IEEE802154_DEV_MAX) 224 if (type >= __IEEE802154_DEV_MAX) {
225 return -EINVAL; 225 rc = -EINVAL;
226 goto nla_put_failure;
227 }
226 } 228 }
227 229
228 dev = phy->add_iface(phy, devname, type); 230 dev = phy->add_iface(phy, devname, type);