From patchwork Fri Jun 19 14:32:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 224224 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25C0AC433E0 for ; Fri, 19 Jun 2020 14:49:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC1DA21841 for ; Fri, 19 Jun 2020 14:49:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592578173; bh=oQoHniCdWbuIkY9elck1nIUM6K/E1dlJcbZqRgeQhHI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=tMYGMOZfQLBs7fUrdyHSKeUqZZC0SiT0AjsKeglMN1FexIB1JMfYPkXhtK+Bo8aYR JN0P1giCN1HDxN3Q1FbfMEi+FVYwHAIqVZRKErNkzzGnbRbitY+0a1bqzbwH0hbJGJ gtd3KEEO4SrY16B2f8PX+Cwr6LqByx198oHMifDY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389215AbgFSOta (ORCPT ); Fri, 19 Jun 2020 10:49:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:42018 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389206AbgFSOt1 (ORCPT ); Fri, 19 Jun 2020 10:49:27 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 909E52158C; Fri, 19 Jun 2020 14:49:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592578167; bh=oQoHniCdWbuIkY9elck1nIUM6K/E1dlJcbZqRgeQhHI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D6l8jTaDSbH20fIKEH0mxpWr4kqJapdT5Jp845f4GXPnfysgff3tQanJsfP10yEo8 BDL/9EOV6jSdRm3hHCBUt42l25eW89neAQ+cYzcOzFSRnYltGEJz3QdfLwUqJdvqnn ekfGR1K9DnrwZqAIx2t45qGO6LWoVIAEun6FNedk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wei Yongjun , Vladimir Zapolskiy , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 109/190] net: lpc-enet: fix error return code in lpc_mii_init() Date: Fri, 19 Jun 2020 16:32:34 +0200 Message-Id: <20200619141639.047272584@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141633.446429600@linuxfoundation.org> References: <20200619141633.446429600@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Wei Yongjun [ Upstream commit 88ec7cb22ddde725ed4ce15991f0bd9dd817fd85 ] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: b7370112f519 ("lpc32xx: Added ethernet driver") Signed-off-by: Wei Yongjun Acked-by: Vladimir Zapolskiy Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/nxp/lpc_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c index 41d30f55c946..6bd6c261f2ba 100644 --- a/drivers/net/ethernet/nxp/lpc_eth.c +++ b/drivers/net/ethernet/nxp/lpc_eth.c @@ -845,7 +845,8 @@ static int lpc_mii_init(struct netdata_local *pldat) if (mdiobus_register(pldat->mii_bus)) goto err_out_unregister_bus; - if (lpc_mii_probe(pldat->ndev) != 0) + err = lpc_mii_probe(pldat->ndev); + if (err) goto err_out_unregister_bus; return 0;