manager: Simplify logic

This commit is contained in:
Denis Kenzior 2019-04-11 12:04:49 -05:00
parent 72158e66da
commit 5a28504d9e
1 changed files with 5 additions and 7 deletions

View File

@ -55,14 +55,12 @@ static void manager_new_wiphy_event(struct l_genl_msg *msg)
return;
wiphy = wiphy_find(id);
if (wiphy) {
wiphy_update_from_genl(wiphy, msg);
return;
}
if (!wiphy) {
wiphy = wiphy_create(id, name);
wiphy = wiphy_create(id, name);
if (!wiphy) /* Possibly blacklisted */
return;
if (!wiphy)
return;
}
wiphy_update_from_genl(wiphy, msg);
}