Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2361778iob; Fri, 6 May 2022 00:30:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8VOi4inZBX5eop8PUjSXWQYXBUyefSSBOvMYkv3TSdcAdQ1oY8YfPhieYfFHcv8iZZxJD X-Received: by 2002:a17:90a:c302:b0:1d9:8222:c9a5 with SMTP id g2-20020a17090ac30200b001d98222c9a5mr2658921pjt.74.1651822206434; Fri, 06 May 2022 00:30:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651822206; cv=none; d=google.com; s=arc-20160816; b=BLN4vVvVj2GfNgWuLklACD5YPhqZud68iV71AOnIVFtw/g2PxEt/sjNAySeqdNTvz8 yhExefpdi+5+we1QeD5Xcoe/6+/AxdZy2dyMvANL6G7Jppq+I3d6+L2WhChCsuyb3Yqr feGM2r+VoE9RvOfkV9uJ/jWrLqL7ygAWCWq/pN/p4WwwlH7p3fvnwC0OOfhXIh61QcOb Xo1EHd8px8f1xu+nh9qpyFUv3UbGMANAi5moXhbbNtiB3n/jZfUyrLrot5xVu2q/mbLE gcrGWn4sMJQWAWwoolLDapg3TIsEO4HmMPGncLPjGneAjQ/9IEtYJBxadq7+RpuLSebD vqcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=usjtV+lE2Yt8/NKqQpQ0P829NYbL/VFFdGemQVrUhys=; b=CBwWa0uQ7UuYNNtY/mNTE1tzNsjh2Mt8CfFhgH0Rqo0+x83qE7autySbbV+rSuKn/C LQ4vBcDraiQAET0qBr8t7wgSlfKzjQkouhsjjqaDPUI+E3SvY/AvhJlBRk1uCzaHKr9e 097+0aopH0caE3Nf3czyhTUI1X3cBcpxfWvRYlp/qmWyDTe/x3vd//ijZ6FUoGNcznXE DY2OQDtoU6TcBJWh5nTA0BXK5BRZS6k+lUj6rdGCNqsRWW7+Bzg7q8igPxx32iuiYpFm uszXdVWOPd2uox8wjLNRptaLHCQmtY2tya3Egjg9dUTQnlk/cy7ofu6k3lojPhEE2EWL tkgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uliJHoVw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v29-20020a63b95d000000b003c1fe7dee96si3809434pgo.833.2022.05.06.00.29.49; Fri, 06 May 2022 00:30:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uliJHoVw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355102AbiEDRHu (ORCPT + 99 others); Wed, 4 May 2022 13:07:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355569AbiEDRAQ (ORCPT ); Wed, 4 May 2022 13:00:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C1504B85E; Wed, 4 May 2022 09:51:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BB970617D4; Wed, 4 May 2022 16:51:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 144D0C385A5; Wed, 4 May 2022 16:51:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683096; bh=AFIzawQbysXjYjCtcBjeB4t+pADeckbAOSyCAuGBxw4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uliJHoVw607CbJEvzL57rhqffRNF1wM6USb6BYKGymtJuqJWGT8xTTik6C/gWcRE/ SLMn6J6VWFKbrFuHA50ryIpjkBuFYYC0l/00YkYYXKoDtCqJsAplDQYsaG48PrbdIb KEk3Z++vZcEtxUDeGkFhNkiSq9pscmkz7MSgfXS8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Baruch Siach , =?UTF-8?q?Marek=20Beh=C3=BAn?= , "Russell King (Oracle)" , Paolo Abeni , Sasha Levin Subject: [PATCH 5.10 088/129] net: phy: marvell10g: fix return value on error Date: Wed, 4 May 2022 18:44:40 +0200 Message-Id: <20220504153027.986477931@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153021.299025455@linuxfoundation.org> References: <20220504153021.299025455@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Baruch Siach [ Upstream commit 0ed9704b660b259b54743cad8a84a11148f60f0a ] 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 Reviewed-by: Marek BehĂșn Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/f47cb031aeae873bb008ba35001607304a171a20.1650868058.git.baruch@tkos.co.il Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- drivers/net/phy/marvell10g.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c index b1bb9b8e1e4e..2b64318efdba 100644 --- a/drivers/net/phy/marvell10g.c +++ b/drivers/net/phy/marvell10g.c @@ -650,7 +650,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)) { -- 2.35.1