Skip to content

Commit 44ecabb

Browse files
authored
Merge pull request #115 from CormickKneey/fork
device-injector: remove unreachable code.
2 parents 229236e + 235aa11 commit 44ecabb

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

plugins/device-injector/device-injector.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ func (p *plugin) CreateContainer(_ context.Context, pod *api.PodSandbox, ctr *ap
8888
return nil, nil, err
8989
}
9090

91-
return adjust, nil, nil
92-
9391
if verbose {
9492
dump(containerName(pod, ctr), "ContainerAdjustment", adjust)
9593
}
@@ -132,10 +130,6 @@ func parseDevices(ctr string, annotations map[string]string) ([]device, error) {
132130
return nil, nil
133131
}
134132

135-
if annotation == nil {
136-
return nil, nil
137-
}
138-
139133
if err := yaml.Unmarshal(annotation, &devices); err != nil {
140134
return nil, fmt.Errorf("invalid device annotation %q: %w", string(annotation), err)
141135
}

0 commit comments

Comments
 (0)