Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp576131img; Fri, 22 Mar 2019 04:22:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcuvGpzNg3ofI0U9ukzGVSfOiyjAbNPQ175xy0UBRLgqvDzUA+EIzC/glMYnTOQsJj6pGn X-Received: by 2002:a63:570d:: with SMTP id l13mr660202pgb.55.1553253769194; Fri, 22 Mar 2019 04:22:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553253769; cv=none; d=google.com; s=arc-20160816; b=JWNY/eui1ouKNe82nzi/ij67cy+K0zFDVDBvjCgcZn6aKeqPpy+ICaWC70QCtKse4y ELMR+8PcWXEj0Kh1KQEHKSSsAyeUu8KqP1jO6vJ6KmanXq4HCLjNF+V5RnfZr4jHXY2v U17HrjNmc9u0/ZESUy4Ruxrp1rdqIzxPmj2ECAW+p3myvETTXwQkUfIvoPe7OnrWWY6P +WaIwqyHMxVdshXVlhgB2GA/w4cN88HvLlGRybkmq4QUV62ZXzpBquYaBNRUKf2rPCDj hukszSi4cPZCjXB1rbZT9Hi7eOVD6QRU+zWj6fQrxIWnDGwr1CoQjVZSwn1SLMIOi/jh yPcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mP32sTRXrZPrvlawxv9nM/XzLSLeZ5pWCq86MzRu81s=; b=ZuSjCqAn+4OFrkpCbP54fteMNLIBhcgzk21h+hRar9bXDTvSk2KJhkhXRlaz/KHud/ xK3dnrY3GRBirrOOGWFQxtwMvWiF9NORe5Q27SGaEPpqZRtkiq71VfKHoVXX2pxNGr0N LVivHZFT8Xau6C46TMCpRGftenXEfwxBa5oXOZIxNtVN7o0e72/sydOaU+jkvArpLzet sqzTrUPeBZ2QB6tl7zfdtVlPbfA5HEHHnRJAZM41zX8tKQrwkT0hn4lOVdqt3N6IucqK gUMjSWXNHDNtmmEUX/c1YltIaw7+1FcQ7Qt2kPI9XVuBJ0bntb3WKxWHsLecJD1oLi3f wM1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LGryAmeH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c16si6731030plo.412.2019.03.22.04.22.31; Fri, 22 Mar 2019 04:22:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LGryAmeH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728552AbfCVLVN (ORCPT + 99 others); Fri, 22 Mar 2019 07:21:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:47670 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728542AbfCVLVM (ORCPT ); Fri, 22 Mar 2019 07:21:12 -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 BA35421917; Fri, 22 Mar 2019 11:21:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553253671; bh=tkV1TpvmJe77mtEi11D+/CaNkHmZuRRuQKV4rvFnYUY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LGryAmeHRYPCBFmWd0moudEEbHn8qdYJ3ca2PR1xb4jukooiM+WBYAEjxYULt+6jG WTGz+eTHxwWHijDBOo0lZdpX3RUQlxgmu06detUvKA/EgyXLQlpcfEtuVHNm8OKKIB 428L2FgoMdfleJnH+v/A6QlGIjJgS5j8pvzfl4ng= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Atsushi Nemoto , Thor Thayer , "David S. Miller" , Sasha Levin Subject: [PATCH 3.18 036/134] net: altera_tse: fix connect_local_phy error path Date: Fri, 22 Mar 2019 12:14:09 +0100 Message-Id: <20190322111212.363111558@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111210.465931067@linuxfoundation.org> References: <20190322111210.465931067@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 17b42a20d7ca59377788c6a2409e77569570cc10 ] The connect_local_phy should return NULL (not negative errno) on error, since its caller expects it. Signed-off-by: Atsushi Nemoto Acked-by: Thor Thayer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/altera/altera_tse_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c index 2eb6404755b1f..c1b599c521953 100644 --- a/drivers/net/ethernet/altera/altera_tse_main.c +++ b/drivers/net/ethernet/altera/altera_tse_main.c @@ -706,8 +706,10 @@ static struct phy_device *connect_local_phy(struct net_device *dev) phydev = phy_connect(dev, phy_id_fmt, &altera_tse_adjust_link, priv->phy_iface); - if (IS_ERR(phydev)) + if (IS_ERR(phydev)) { netdev_err(dev, "Could not attach to PHY\n"); + phydev = NULL; + } } else { int ret; -- 2.19.1