Re: [PATCH] iio: Fix uninitialized symbol 'ret'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/11/2024 05:43, Zicheng Qu wrote:
Hi Matti,

It might be better but I am not pretty sure whether have to have both gains and times, so I modified 'ret' in places where issues might arise, rather than adding a restriction in iio_gts_sanity_check().

Yes. Thanks for the fix.

In the corner case, there is a restriction that both num_hwgain and num_itime cannot be 0 simultaneously in the iio_gts_sanity_check().

Right. Having both 0 would mean there was nothing at all to handle for the GTS.

However, in the gain_to_scaletables() , if num_itime is 1 and num_hwgain is 0, the 'gain_bytes' becomes 0 and 'all_gains' is not null after the 'for' loop, which causes the subsequent 'while' or 'for' to become ineffective, leading to an undefined 'ret' being returned in the 'free_out'.

Yes. Thank you for the fix :)

Yours,
    -- Matti




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux