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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user