Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7422313rwi; Mon, 24 Oct 2022 14:32:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5xhtiYhyknRZjJTQs5TldxGOxi0l4uEnAz1rVwJFSjnWT/m6GE3Yk0IjwN8BXKkbHvNDrX X-Received: by 2002:a05:6402:2712:b0:45d:de37:f828 with SMTP id y18-20020a056402271200b0045dde37f828mr31416291edd.317.1666647136663; Mon, 24 Oct 2022 14:32:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666647136; cv=none; d=google.com; s=arc-20160816; b=chRe2fHPLj+G5xH5mErMtfX6W5chjpyf6+G8m0CCfCHAfk0zIj/8j+gYQ9WFxHH7yY 50F3pOs0MGK9gc+2o5Ti89/QNWfEluND4RqmCmMITI/3BNrjtxesZwBHGPRoa0r4YkFR rsJu7bM+M0oLSyH6FagfGQXu22aYgEXhExoE0Z7B9ax0cLF9/6VA+AMAlt1oezWF0XMS So+l4nKsms8n81THj1GDzem+cA/dOveVSoDCJSclh6XE7yBoeYyMDdKJY7rMiOsddBl4 1pul+snFKuQ85sjhMIsIlFel84ePnpvkZPyxbAfopv6eWWqNxEmnsn/bY8txZVlED9ec GScg== 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=2faJEEOkcg0BFFaPon09pTeCWDOh8zjLxsdn9OWF0Hw=; b=zYGSQVv5SXfZF6HMIkeaUTvpgXPYoFKeC+XxZ801lYKp+EHtyKai/3UJSyvUxqcegU hTes9lkOe7Vt0KLXusFjJ/I2LYjGXW3+1edROQMgvKBM9/NEEEDV1CGskYzbq6f9FFOG fF4E1eXXPJqXLDVptPSdb8Obu8HyBf9/aTerhXDZlCG6D6q9BzuEFqRQtW1nI519pCWh LysT+w+leB3zrz4ERc0XvXY39WdFmkOy4x/v+YkVu84CS0QSxqG3FeEXNSdiSnD6/TRb +DXbWXgurvnHsF0gbmWjAtAiK/NU5C2MYyZkR2Jxjbs/Dx0zSSD29DXFet8w8pgR7KGQ Egkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FStUWkWW; 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 c16-20020a0564021f9000b00456662097dasi828032edc.69.2022.10.24.14.31.51; Mon, 24 Oct 2022 14:32:16 -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=FStUWkWW; 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 S234589AbiJXUiE (ORCPT + 99 others); Mon, 24 Oct 2022 16:38:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234539AbiJXUhY (ORCPT ); Mon, 24 Oct 2022 16:37:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C05282B26A; Mon, 24 Oct 2022 11:49:02 -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 ams.source.kernel.org (Postfix) with ESMTPS id F12E5B81661; Mon, 24 Oct 2022 12:22:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B6C0C433C1; Mon, 24 Oct 2022 12:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614142; bh=deb/+f+bTm4Ytyvf8OL7N3yZQGGpLOBi7QxH7ZECr8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FStUWkWWxuZDXLZ2swrvTnoUueVT4ccCVoPAFTvDTkfcJLpMKyeE3VWyseSCi/uyk tYts5V/Pf8iI/rxYOcahZ5DtiBzvAUwMHfbJTSAC5j9XgwmMz+mRxJZgoZNWznDiSR wZhSYg/1hY/1LtJJdZF9xh+fhVhTaWEo6BGsks2U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zheng Yongjun , Christophe Leroy , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 118/390] net: fs_enet: Fix wrong check in do_pd_setup Date: Mon, 24 Oct 2022 13:28:35 +0200 Message-Id: <20221024113027.705335291@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 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 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: Zheng Yongjun [ Upstream commit ec3f06b542a960806a81345042e4eee3f8c5dec4 ] Should check of_iomap return value 'fep->fec.fecp' instead of 'fep->fcc.fccp' Fixes: 976de6a8c304 ("fs_enet: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING is set.") Signed-off-by: Zheng Yongjun Reviewed-by: Christophe Leroy Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c index 99fe2c210d0f..61f4b6e50d29 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c +++ b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c @@ -98,7 +98,7 @@ static int do_pd_setup(struct fs_enet_private *fep) return -EINVAL; fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0); - if (!fep->fcc.fccp) + if (!fep->fec.fecp) return -EINVAL; return 0; -- 2.35.1