]> sigrok.org Git - libsigrok.git/commit
asix-sigma: Propagate errors from firmware upload
authorGerhard Sittig <redacted>
Sun, 25 Jun 2017 10:01:43 +0000 (12:01 +0200)
committerUwe Hermann <redacted>
Tue, 27 Jun 2017 11:28:25 +0000 (13:28 +0200)
commit7bcf21683e6b8f77d55eaab7da5ea0bbe2949a6b
treecf940fb5c0229e128bdcf06389574288cfe46a91
parentad466f86cc0497f6a5ba0e2540e399c32c0b96ba
asix-sigma: Propagate errors from firmware upload

The firmware upload code paths in the asix-sigma driver used to return
either the SR_OK code, or the magic number 0 for error conditions. Which
happens to be identical and cannot be told apart by callers.

Provide proper SR_ERR return codes for error conditions, such that
callers can tell whether the firmware upload succeeded.

This fixes part of bug #471.

Suggested-By: Marian Cingel <redacted>
src/hardware/asix-sigma/protocol.c