From 4c37616790aed90e6c7bf8fee61b29d0c6248044 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 16 Apr 2015 14:19:37 -0700 Subject: [PATCH] netdev-bsd: Fix netdev_bsd_get_mtu() return value. When netdev_bsd_get_mtu() failed, it didn't report the error to the caller, so the caller couldn't work around not knowing the MTU, and ended up using an uninitialized 'mtu' value. Found by LLVM scan-build. Reported-by: Kevin Lo Signed-off-by: Ben Pfaff Acked-by: Jarno Rajahalme Acked-by: Kevin Lo Acked-by: YAMAMOTO Takashi --- lib/netdev-bsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netdev-bsd.c b/lib/netdev-bsd.c index 671de3745..b377baf7e 100644 --- a/lib/netdev-bsd.c +++ b/lib/netdev-bsd.c @@ -834,7 +834,7 @@ netdev_bsd_get_mtu(const struct netdev *netdev_, int *mtup) } ovs_mutex_unlock(&netdev->mutex); - return 0; + return error; } static int -- 2.20.1