diff --git a/collector/cpu_linux.go b/collector/cpu_linux.go index 2ddb9c4b..84ad373b 100644 --- a/collector/cpu_linux.go +++ b/collector/cpu_linux.go @@ -142,10 +142,7 @@ func (c *cpuCollector) Update(ch chan<- prometheus.Metric) error { if err := c.updateStat(ch); err != nil { return err } - if err := c.updateThermalThrottle(ch); err != nil { - return err - } - return nil + return c.updateThermalThrottle(ch) } // updateInfo reads /proc/cpuinfo diff --git a/collector/drm_linux.go b/collector/drm_linux.go index 21a0314e..11b8c628 100644 --- a/collector/drm_linux.go +++ b/collector/drm_linux.go @@ -99,11 +99,7 @@ func NewDrmCollector(logger log.Logger) (Collector, error) { } func (c *drmCollector) Update(ch chan<- prometheus.Metric) error { - if err := c.updateAMDCards(ch); err != nil { - return err - } - - return nil + return c.updateAMDCards(ch) } func (c *drmCollector) updateAMDCards(ch chan<- prometheus.Metric) error {