Skip to content

Commit

Permalink
fix: invalid boolean logic in UpdateDevice code
Browse files Browse the repository at this point in the history
#33

Signed-off-by: Anthony Casagrande <anthony.j.casagrande@intel.com>
  • Loading branch information
ajcasagrande committed Jun 24, 2021
1 parent 13be571 commit fae2f57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ func (d *Driver) UpdateDevice(deviceName string, protocols protocolMap, adminSta
var isNew bool
dev, isNew, err = d.getDevice(deviceName, protocols)
// No need to call update if the device was just created.
if !(err == nil && isNew) {
if isNew || err != nil {
return err
}

Expand Down

0 comments on commit fae2f57

Please sign in to comment.