mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -08:00
Remove redundant nil check (#2206)
Signed-off-by: computerphilosopher <bspark@jam2in.com>
This commit is contained in:
parent
d85cbaa17c
commit
c861ba93aa
|
@ -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…
Reference in a new issue