Re: [PATCH] net: dsa: vsc73xxx: Fix uninitalized 'val' in vsc73xx_adjust_link
From: Jakub Kicinski
Date: Mon Mar 13 2023 - 18:22:50 EST
On Mon, 13 Mar 2023 19:59:27 +0100 Simon Horman wrote:
> On Sun, Mar 12, 2023 at 03:50:08PM +0000, Danila Chernetsov wrote:
> > Using uninitialized variable after calls vsc73xx_read
> > without error checking may cause incorrect driver behavior.
>
> I wonder if it is:
> a) intentional that these calls are not checked for errors
> b) errors can occur in these call paths
At the very least we should handle the error rather than silencing
the static checker complain by picking a semi-random init value for
the entire function.