crihook: fix ineffective Errorf call

Returned error instead of calling errors.Errorf with no effect.
This commit is contained in:
Ed Bartosh 2019-09-16 12:41:24 +03:00
parent 3dd8002e88
commit a6b3a217e8

View File

@ -167,7 +167,7 @@ func (he *hookEnv) getFPGAParams(config *Config) ([]fpgaParams, error) {
for num, region := range regionEnv {
afu, ok := afuEnv[num]
if !ok {
errors.Errorf("Environment variable %s%s is not set", fpgaAfuEnvPrefix, num)
return nil, errors.Errorf("Environment variable %s%s is not set", fpgaAfuEnvPrefix, num)
}
// Find a device suitable for the region/interface id