Remove redundant nil check (#2206)

Signed-off-by: computerphilosopher <bspark@jam2in.com>
pull/2210/head
Park Beomsu 4 years ago committed by GitHub
parent d85cbaa17c
commit c861ba93aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      collector/cpu_linux.go
  2. 6
      collector/drm_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

@ -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 {

Loading…
Cancel
Save