Skip to content

Commit

Permalink
revert WriteEeprom return logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jpoirier committed Nov 23, 2015
1 parent e201649 commit 8739ed2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rtlsdr.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,15 @@ func (dev *Context) WriteEeprom(data []uint8, offset uint8, leng uint16) (err er
C.uint8_t(offset),
C.uint16_t(leng)))
switch {
case i == 0:
return
default:
err = nil
case i == -1:
err = errors.New("device handle is invalid")
case i == -2:
err = errors.New("EEPROM size exceeded")
case i == -3:
err = errors.New("no EEPROM was found")
default:
case i < -4:
err = errors.New("unknown error")
}
return
Expand Down

0 comments on commit 8739ed2

Please sign in to comment.