From 7c5bd0c64dce2083d85bca7fe9c8a4c935f876ce Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 19 Jun 2013 12:28:48 -0500 Subject: [PATCH] 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. --- src/platform/nm-linux-platform.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 002cf51b8..be60f12f3 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -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); }