Re: [PATCH net] net: phy: marvell-88q2xxx: Fix clamped value in mv88q2xxx_hwmon_write
From: Andrew Lunn <andrew@lunn.ch>
Date: 2025-12-02 18:35:39
Also in:
lkml, stable
From: Andrew Lunn <andrew@lunn.ch>
Date: 2025-12-02 18:35:39
Also in:
lkml, stable
On Tue, Dec 02, 2025 at 06:27:44PM +0100, Thorsten Blum wrote:
The local variable 'val' was never clamped to -75000 or 180000 because
the return value of clamp_val() was not used. Fix this by assigning the
clamped value back to 'val', and use clamp() instead of clamp_val().
Cc: stable@vger.kernel.org
Fixes: a557a92e6881 ("net: phy: marvell-88q2xxx: add support for temperature sensor")
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew