platform: fix return value for no-firmware case

The function returns 'gboolean' so it shouldn't be returning an
enum, but it should instead set the platform error and return FALSE.
This commit is contained in:
Dan Williams
2013-06-19 12:28:48 -05:00
parent b294a1ef63
commit 7c5bd0c64d

View File

@@ -1120,8 +1120,10 @@ link_change (NMPlatform *platform, int ifindex, struct rtnl_link *change)
* This is basically the same check as in the original code and could
* potentially be improved.
*/
if (nle == -NLE_OBJ_NOTFOUND)
return NM_PLATFORM_ERROR_NO_FIRMWARE;
if (nle == -NLE_OBJ_NOTFOUND) {
platform->error = NM_PLATFORM_ERROR_NO_FIRMWARE;
return FALSE;
}
return refresh_object (platform, (struct nl_object *) rtnllink, nle);
}