diff mbox series

net: phy: marvell10g: fix return value on error

Message ID f47cb031aeae873bb008ba35001607304a171a20.1650868058.git.baruch@tkos.co.il (mailing list archive)
State Accepted
Commit 0ed9704b660b259b54743cad8a84a11148f60f0a
Delegated to: Netdev Maintainers
Headers show
Series net: phy: marvell10g: fix return value on error | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers fail 2 blamed authors not CCed: andrew@lunn.ch davem@davemloft.net; 5 maintainers not CCed: andrew@lunn.ch davem@davemloft.net pabeni@redhat.com hkallweit1@gmail.com kuba@kernel.org
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Baruch Siach April 25, 2022, 6:27 a.m. UTC
From: Baruch Siach <baruch.siach@siklu.com>

Return back the error value that we get from phy_read_mmd().

Fixes: c84786fa8f91 ("net: phy: marvell10g: read copper results from CSSR1")
Signed-off-by: Baruch Siach <baruch.siach@siklu.com>
---
 drivers/net/phy/marvell10g.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marek Behún April 25, 2022, 8:57 a.m. UTC | #1
On Mon, 25 Apr 2022 09:27:38 +0300
Baruch Siach <baruch@tkos.co.il> wrote:

> From: Baruch Siach <baruch.siach@siklu.com>
> 
> Return back the error value that we get from phy_read_mmd().
> 
> Fixes: c84786fa8f91 ("net: phy: marvell10g: read copper results from CSSR1")
> Signed-off-by: Baruch Siach <baruch.siach@siklu.com>

Reviewed-by: Marek Behún <kabel@kernel.org>
Russell King (Oracle) April 25, 2022, 3:34 p.m. UTC | #2
On Mon, Apr 25, 2022 at 09:27:38AM +0300, Baruch Siach wrote:
> From: Baruch Siach <baruch.siach@siklu.com>
> 
> Return back the error value that we get from phy_read_mmd().
> 
> Fixes: c84786fa8f91 ("net: phy: marvell10g: read copper results from CSSR1")
> Signed-off-by: Baruch Siach <baruch.siach@siklu.com>

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Thanks!
patchwork-bot+netdevbpf@kernel.org April 26, 2022, 10 a.m. UTC | #3
Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Mon, 25 Apr 2022 09:27:38 +0300 you wrote:
> From: Baruch Siach <baruch.siach@siklu.com>
> 
> Return back the error value that we get from phy_read_mmd().
> 
> Fixes: c84786fa8f91 ("net: phy: marvell10g: read copper results from CSSR1")
> Signed-off-by: Baruch Siach <baruch.siach@siklu.com>
> 
> [...]

Here is the summary with links:
  - net: phy: marvell10g: fix return value on error
    https://git.kernel.org/netdev/net/c/0ed9704b660b

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c
index b6fea119fe13..2b7d0720720b 100644
--- a/drivers/net/phy/marvell10g.c
+++ b/drivers/net/phy/marvell10g.c
@@ -880,7 +880,7 @@  static int mv3310_read_status_copper(struct phy_device *phydev)
 
 	cssr1 = phy_read_mmd(phydev, MDIO_MMD_PCS, MV_PCS_CSSR1);
 	if (cssr1 < 0)
-		return val;
+		return cssr1;
 
 	/* If the link settings are not resolved, mark the link down */
 	if (!(cssr1 & MV_PCS_CSSR1_RESOLVED)) {