[PATCH v2] mtd: rawnand: meson: initialize struct with zeroes
Martin Blumenstingl
martin.blumenstingl at googlemail.com
Tue Feb 21 13:31:30 PST 2023
Hello Arseniy,
On Tue, Feb 21, 2023 at 11:07 AM Arseniy Krasnov
<AVKrasnov at sberdevices.ru> 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 <AVKrasnov at sberdevices.ru>
Regardless of my comment above:
Acked-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
Best regards,
Martin
More information about the linux-amlogic
mailing list