Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1430185iob; Thu, 5 May 2022 00:36:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxb4cymu/sdl1eLnTOO+aGC5Kx7eSNMes6d7OBQidKd3Uczy35IVId0uPFJBHbANTIkfY9N X-Received: by 2002:a17:90b:1d03:b0:1dc:9589:7c90 with SMTP id on3-20020a17090b1d0300b001dc95897c90mr4518068pjb.225.1651736214574; Thu, 05 May 2022 00:36:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651736214; cv=none; d=google.com; s=arc-20160816; b=x84+xmB6CNv3RgrfFCcxkmN8GEZn3YSB3o62Ja8ukPIaH2XYY7h3ZpqsVynEeS09aV Dw8Y1dUUkiC4VlsWii0LGdL6h1s4ATOVQNb/i6CP0kyteXX06iBPmaN8yTqvdM6I022t F1kWWGWYG2mw+2RbW4AYI8Z8LjKQVi8a1kOUtcJQ5TCqk5viuXyFt9UpiV2ht5nI3Cl0 HmCR6zA2KDowfh0QB/9lNfA7h5rq4uKoj1GF0Zb66HjCooN4YYPe0liVg1WJbbfJZo56 YC0XRbhWtcwOa6A/EQijiC1pwOT5qIrrk2wQXkPm+GordO9Cv6zbWt5KObaIkGqBWkgB PHLQ== 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=9XGdMYaE6Yqv5gMzfjqpSYSer/HYygOfiaeFVuOHkvo=; b=nD8LQOwKlxeyCNBDRpV31m8WUJSX6ag1zYkJtBXupvg8FEO/9yC9aaaR6W07npW81z wMr/eE+uCAgoP6nUBIlqgeoAQqiW7mYmcPEVmcf6hkyxovvUjGpEFddW2B5zCA/0AnWc MS4gfan0clWe1ItcTp0u6PZOQniHFNLXFkM7tcluKmSw+UGbAIdDgnbyel5EMfXYYLe/ ecJp4fZR9Sl9ALjTiQJbUSW4Arhtk94SZJte0v+e9WXKkO6HPkjDUu9f+km3Q0MR+q+J XIqmez/NGeLRUnloQnVwWPS3YVJM1FoVR6WEnhHZIqEapeJptT3RHJJTpSHClz0ASYQ6 oFcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mzwZQtSK; 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 y18-20020a656c12000000b003c21613d062si747193pgu.329.2022.05.05.00.36.39; Thu, 05 May 2022 00:36:54 -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=mzwZQtSK; 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 S1357389AbiEDRTe (ORCPT + 99 others); Wed, 4 May 2022 13:19:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356386AbiEDRFK (ORCPT ); Wed, 4 May 2022 13:05:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCA5250E07; Wed, 4 May 2022 09:54:03 -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 1FFE8617A6; Wed, 4 May 2022 16:54:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D889C385A5; Wed, 4 May 2022 16:54:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683242; bh=bpjUbE/Xn+hEI8S5xOfpY2zy1g5hUwfAs4TcqRSWHuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mzwZQtSKUZzvTGYYUAnbgLa21HR/qEA10fHS0cxEL/U+L8lAUyMGrLbZ+gBf1+gi6 dZuTTGJ8v50Vvp0CaoHMb2ShiLsGaeiArV2kv/zzHP/9CshkFKtTA4SZlazFNmaCTd mrrYU2TxIFdPFkCQ17r88/mJ27caUVqwvgYSXqe4= 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.15 107/177] net: phy: marvell10g: fix return value on error Date: Wed, 4 May 2022 18:45:00 +0200 Message-Id: <20220504153102.805435201@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153053.873100034@linuxfoundation.org> References: <20220504153053.873100034@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 bd310e8d5e43..df33637c5269 100644 --- a/drivers/net/phy/marvell10g.c +++ b/drivers/net/phy/marvell10g.c @@ -789,7 +789,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