Remove redundant nil check (#2206)

Signed-off-by: computerphilosopher <bspark@jam2in.com>
This commit is contained in:
Park Beomsu 2021-11-15 19:23:49 +09:00 committed by GitHub
parent d85cbaa17c
commit c861ba93aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 9 deletions

View file

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

View file

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