Re: [PATCH 3/4] net: dsa: mv88e6xxx: Handle error in serdes_get_regs

From: Andrew Lunn
Date: Fri Oct 23 2020 - 18:39:54 EST


On Thu, Oct 22, 2020 at 02:25:14PM +1300, Chris Packham wrote:
> If the underlying read operation failed we would end up writing stale
> data to the supplied buffer. This would end up with the last
> successfully read value repeating. Fix this by only writing the data
> when we know the read was good. This will mean that failed values will
> return 0xffff.
>
> Signed-off-by: Chris Packham <chris.packham@xxxxxxxxxxxxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew