From patchwork Fri Jun 19 14:32:03 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: 223797 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=unavailable 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 DCB69C433E0 for ; Fri, 19 Jun 2020 16:23:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ACF5F2168B for ; Fri, 19 Jun 2020 16:23:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592583828; bh=oQoHniCdWbuIkY9elck1nIUM6K/E1dlJcbZqRgeQhHI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=HY9g8n4NpzXiNJ8K8AjtTxcPgRn+jf/gDjq0z5J4K0DsZqPhwfiBrHV8TSOLMoZ3Y DUZRXI4DitkI+iu1wF/qYGJyeoR+Who7XoSTGTHWPJgZYKcEoEcAVl2+B/KQOx6qs/ ElB54ts4Kw3h5fY/LSTlfisgqwXB60BuvvL9xXx8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389201AbgFSQXn (ORCPT ); Fri, 19 Jun 2020 12:23:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:55026 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390455AbgFSO7A (ORCPT ); Fri, 19 Jun 2020 10:59:00 -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 55C9821924; Fri, 19 Jun 2020 14:59:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592578740; bh=oQoHniCdWbuIkY9elck1nIUM6K/E1dlJcbZqRgeQhHI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=In8tmNc5cnBjRog76ulYeJmZ+xvKcDcsRf21BImZBVTtIIH74sc1xlS1h2cYEnkuV CUDWWELq4x9YUqEasrzBcmfcjW28I4WCY8dnl3WqXK0QEF9jcIr1hz0bHJNaUoUn6Q v6fxAFDKYWQZcXTvRPcNp3dW2R3TDBeuRqiMB594= 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.19 138/267] net: lpc-enet: fix error return code in lpc_mii_init() Date: Fri, 19 Jun 2020 16:32:03 +0200 Message-Id: <20200619141655.448321027@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141648.840376470@linuxfoundation.org> References: <20200619141648.840376470@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;