[lkml]   [2023]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] mtd: rawnand: meson: initialize struct with zeroes
Hello Arseniy,

On Tue, Feb 21, 2023 at 11:07 AM Arseniy Krasnov
<> wrote:
> This structure must be zeroed, because it's field 'hw->core' is used as
> 'parent' in 'clk_core_fill_parent_index()', but it will be uninitialized.
> This happens, because when this struct is not zeroed, pointer 'hw' is
> "initialized" by garbage, which is valid pointer, but points to some
> garbage. So 'hw' will be dereferenced, but 'core' contains some random
> data which will be interpreted as pointer.
I think this should be written as "interpreted as a pointer". I'm not
a native English speaker though, so I'm hoping that someone else can
provide feedback as well.

> Fixes: 1e4d3ba66888 ("mtd: rawnand: meson: fix the clock")
> Signed-off-by: Arseniy Krasnov <>
Regardless of my comment above:
Acked-by: Martin Blumenstingl <>

Best regards,

 \ /
  Last update: 2023-03-27 00:30    [W:0.047 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site