On Wed, Mar 17, 2021 at 4:14 PM Lukasz Majewski <[email protected]> wrote:
>
> Those automatically created structures can have random value.
> However, mv88e61xx driver assumes that those are zeroed.
>
> Signed-off-by: Lukasz Majewski <[email protected]>
> ---
>
>  drivers/net/phy/mv88e61xx.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/phy/mv88e61xx.c b/drivers/net/phy/mv88e61xx.c
> index 14074c0b82fb..d8116530700d 100644
> --- a/drivers/net/phy/mv88e61xx.c
> +++ b/drivers/net/phy/mv88e61xx.c
> @@ -1230,6 +1230,10 @@ int get_phy_id(struct mii_dev *bus, int smi_addr, int 
> devad, u32 *phy_id)
>         struct mii_dev temp_mii;
>         int val;
>
> +       memset(&temp_phy, 0, sizeof(temp_phy));
> +       memset(&temp_priv, 0, sizeof(temp_priv));
> +       memset(&temp_mii, 0, sizeof(temp_mii));
> +
>         /*
>          * Buid temporary data structures that the chip reading code needs to
>          * read the ID
> --
> 2.20.1
>
Reviewed-by: Ramon Fried <[email protected]>

Reply via email to