3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

manager: Simplify logic

This commit is contained in:
Denis Kenzior 2019-04-11 12:04:49 -05:00
parent 72158e66da
commit 5a28504d9e

View File

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