Re: [PATCH] iio: trigger: stm32-timer: fix the usage of uninitialized variables

2019-10-02 Thread Benjamin GAIGNARD
On 10/1/19 10:43 AM, Jonathan Cameron wrote: > On Mon, 30 Sep 2019 13:44:49 -0700 > Yizhuo wrote: > >> Several functions in this file are trying to use regmap_read() to >> initialize the specific variable, however, if regmap_read() fails, >> the variable could be uninitialized but used directly,

Re: [PATCH] iio: trigger: stm32-timer: fix the usage of uninitialized variables

2019-10-01 Thread Jonathan Cameron
On Mon, 30 Sep 2019 13:44:49 -0700 Yizhuo wrote: > Several functions in this file are trying to use regmap_read() to > initialize the specific variable, however, if regmap_read() fails, > the variable could be uninitialized but used directly, which is > potentially unsafe. The return value of reg

[PATCH] iio: trigger: stm32-timer: fix the usage of uninitialized variables

2019-09-30 Thread Yizhuo
Several functions in this file are trying to use regmap_read() to initialize the specific variable, however, if regmap_read() fails, the variable could be uninitialized but used directly, which is potentially unsafe. The return value of regmap_read() should be checked and handled. This patch fixes