Subject: Re: [PATCH][linux-next] net/mlx5: Bridge, fix uninitialized variable in mlx5_esw_bridge_port_changeupper()

From: Vlad Buslov <[email-masked]>
Date: Wed, 18 Aug 2021 19:47:55 +0300

On Wed 18 Aug 2021 at 18:52, Tim Gardner <[email-masked]> wrote:
> A recent change removed code that initialized the return code variable 'err'. It
> is now possible for mlx5_esw_bridge_port_changeupper() to return an error code
> using this uninitialized variable. Fix it by initializing to 0.
>
> Addresses-Coverity: ("Uninitialized scalar variable (UNINIT)")
>
> Cc: Saeed Mahameed <[email-masked]>
> Cc: Leon Romanovsky <[email-masked]>
> Cc: "David S. Miller" <[email-masked]>
> Cc: Jakub Kicinski <[email-masked]>
> Cc: Vlad Buslov <[email-masked]>
> Cc: Jianbo Liu <[email-masked]>
> Cc: Mark Bloch <[email-masked]>
> Cc: Roi Dayan <[email-masked]>
> Cc: Vladimir Oltean <[email-masked]>
> Cc: [email-masked]
> Cc: [email-masked]
> Cc: [email-masked]
> Signed-off-by: Tim Gardner <[email-masked]>
> ---

Tim, thanks for fixing this!

Saeed, this is the second similar issue that I mentioned in my reply to
Colin. Again, I've already submitted same patch internally and this one
is as good as mine.

Reviewed-by: Vlad Buslov <[email-masked]>

[...]