Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198573
b: refs/heads/master
c: a6c0f82
h: refs/heads/master
i:
  198571: 9aada9a
v: v3
  • Loading branch information
Denis Kirjanov authored and David S. Miller committed May 24, 2010
1 parent 34aa86a commit 71468b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 418c437d8b4b87815f3afed89da2aa0078d5379d
refs/heads/master: a6c0f8217c17d46da22fa56923f3cbd03615cb7c
7 changes: 6 additions & 1 deletion trunk/net/ieee802154/wpan-class.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,15 @@ struct wpan_phy *wpan_phy_alloc(size_t priv_size)
struct wpan_phy *phy = kzalloc(sizeof(*phy) + priv_size,
GFP_KERNEL);

if (!phy)
goto out;
mutex_lock(&wpan_phy_mutex);
phy->idx = wpan_phy_idx++;
if (unlikely(!wpan_phy_idx_valid(phy->idx))) {
wpan_phy_idx--;
mutex_unlock(&wpan_phy_mutex);
kfree(phy);
return NULL;
goto out;
}
mutex_unlock(&wpan_phy_mutex);

Expand All @@ -168,6 +170,9 @@ struct wpan_phy *wpan_phy_alloc(size_t priv_size)
phy->current_page = 0; /* for compatibility */

return phy;

out:
return NULL;
}
EXPORT_SYMBOL(wpan_phy_alloc);

Expand Down

0 comments on commit 71468b3

Please sign in to comment.