[lvc-project] [PATCH] net: dsa: vsc73xxx: Fix uninitalized 'val' in vsc73xx_adjust_link

Jakub Kicinski kuba at kernel.org
Tue Mar 14 01:22:23 MSK 2023


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.



More information about the lvc-project mailing list