Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1556674
| From | Gabriel Fernandez <gabriel.fernandez@st.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] clk: stm32f4: avoid uninitialized variable access |
| Date | 2017-01-11 17:20 +0100 |
| Message-ID | <sYtMZ-Fd-7@gated-at.bofh.it> (permalink) |
| References | <sYrrQ-7xT-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 01/11/2017 02:40 PM, Arnd Bergmann wrote:
> The failure path in the newly added function tries to free an
> uninitialized pointer:
>
> drivers/clk/clk-stm32f4.c: In function 'stm32f4_rcc_init':
> drivers/clk/clk-stm32f4.c:1106:4: error: 'gate' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>
> I'm adding an initialization to NULL here to make the kfree()
> succeed, and I'm also rearranging the cleanup so that the
> same kfree() is used for any error path, making the function
> slightly more robust against newly introduced bugs in the
> error handling.
>
> Fixes: daf2d117cbca ("clk: stm32f4: Add lcd-tft clock")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/clk/clk-stm32f4.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
>
Acked-by: Gabriel Fernandez <gabriel.fernandez@st.com>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] clk: stm32f4: avoid uninitialized variable access Arnd Bergmann <arnd@arndb.de> - 2017-01-11 14:50 +0100
Re: [PATCH] clk: stm32f4: avoid uninitialized variable access Gabriel Fernandez <gabriel.fernandez@st.com> - 2017-01-11 17:20 +0100
Re: [PATCH] clk: stm32f4: avoid uninitialized variable access Stephen Boyd <sboyd@codeaurora.org> - 2017-01-12 23:10 +0100
Re: [PATCH] clk: stm32f4: avoid uninitialized variable access Arnd Bergmann <arnd@arndb.de> - 2017-01-12 23:50 +0100
Re: [PATCH] clk: stm32f4: avoid uninitialized variable access Stephen Boyd <sboyd@codeaurora.org> - 2017-01-13 00:00 +0100
csiph-web