Hi Martin,

Martin Stensgård wrote:
> When no firmware file is found, return the right error code so
> Sigrok doesn't continue running with no firmware loaded.
..
> +++ b/libsigrok/hardware/asix-sigma/asix-sigma.c
> @@ -1210,6 +1210,7 @@ static int hw_start_acquisition(int device_index, 
> gpointer session_device_id)
>       struct triggerinout triggerinout_conf;
>       struct triggerlut lut;
>       int triggerpin;
> +        int ret;

There seems to be a whitespace mismatch here.


> @@ -1219,8 +1220,12 @@ static int hw_start_acquisition(int device_index, 
> gpointer session_device_id)
>       sigma = sdi->priv;
>  
>       /* If the samplerate has not been set, default to 200 KHz. */
> -     if (sigma->cur_firmware == -1)
> -             set_samplerate(sdi, SR_KHZ(200));
> +     if (sigma->cur_firmware == -1) {
> +             ret = set_samplerate(sdi, SR_KHZ(200));
> +
> +                if (ret == SR_ERR)
> +                    return ret;
> +        }

And also in this part of the patch.

Please make sure to always pay close attention to coding style.


//Peter

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to