Thread (4 messages) flat view 4 messages, 4 authors, 2023-03-13

Re: [PATCH] net: dsa: vsc73xxx: Fix uninitalized 'val' in vsc73xx_adjust_link

From: Vladimir Oltean <olteanv@gmail.com>
Date: 2023-03-13 23:05:35
Also in: lkml

On Mon, Mar 13, 2023 at 07:59:27PM +0100, Simon Horman wrote:
On Sun, Mar 12, 2023 at 03:50:08PM +0000, Danila Chernetsov wrote:
quoted
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
probably no; this is precisely the only vsc73xx_read() call whose return
code is ignores. I'd say it partly has to do with the fact that vsc73xx_adjust_link()
returns void, so the author was thinking there'd be no point in checking
for errors, but there clearly is
b) errors can occur in these call paths
probably yes; one of the instantiations of vsc73xx is over SPI, where
the controller can time out, etc.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help