From: Gabriel Rosenhouse Date: Wed, 13 Sep 2017 03:26:37 +0000 (-0700) Subject: host-device: do not swallow netlink errors X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=25ca6ccb521d2e38e4c97fb824af3dd7cc921ae7;p=plugins.git host-device: do not swallow netlink errors --- diff --git a/plugins/host-device/host-device.go b/plugins/host-device/host-device.go index 573dc1c..80c0d0b 100644 --- a/plugins/host-device/host-device.go +++ b/plugins/host-device/host-device.go @@ -115,9 +115,7 @@ func getLink(devname, hwaddr, kernelpath string) (netlink.Link, error) { } if len(devname) > 0 { - if m, err := netlink.LinkByName(devname); err == nil { - return m, nil - } + return netlink.LinkByName(devname) } else if len(hwaddr) > 0 { hwAddr, err := net.ParseMAC(hwaddr) if err != nil {