Skip to content

Commit

Permalink
wireless: keep trying to kzalloc to avoid a crash on page allocation …
Browse files Browse the repository at this point in the history
…failure
  • Loading branch information
Daz Jones committed Mar 16, 2013
1 parent c05460a commit b7c1627
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/wireless/core.c
Expand Up @@ -342,8 +342,9 @@ struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv)
alloc_size = sizeof(*rdev) + sizeof_priv;

rdev = kzalloc(alloc_size, GFP_KERNEL);
if (!rdev)
return NULL;

while(!rdev)
rdev = kzalloc(alloc_size, GFP_KERNEL);

rdev->ops = ops;

Expand Down

0 comments on commit b7c1627

Please sign in to comment.