From patchwork Sat Oct 22 07:22:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7320 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1093597wrr; Sat, 22 Oct 2022 00:57:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM67oRpq+juiWXTR5OKk+dG3WaIN+Wzi3b2HL6cRHtZV/M5YMzdLLW3qLDc3Iwa4wPEe321H X-Received: by 2002:a62:b501:0:b0:557:d887:20ee with SMTP id y1-20020a62b501000000b00557d88720eemr23231822pfe.8.1666425467178; Sat, 22 Oct 2022 00:57:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666425467; cv=none; d=google.com; s=arc-20160816; b=BiglWv/2HbxU+871r2/juMkyuupBeLkS/q1nHfum4FZpCXlSHap4Xy4j6osSGYKnsv YxPIY4xjzbmoYxjpEgDWtOWhfsSIk7dzrwyFtlyMTM7IZyNRk9IW9rZ1qn0UESQXdu8v X32Dy9ndEI/oniubqxKVt1RrWY1eLm4lr5C+zP6atDqGVDhbC/JK8D7ypWqqdzdi/ee0 Ljj/lGYNNia6VFwL5cUPY22SC4b/sNoWFZKVFwm/I7af5hDtC0u3jylbwZ528hXcBN7n Zfq2KCev+qJ12LgVoHPKBgEJJSv3NygZuV2N0ay5eDXFTTIGucCIhzRpjsojpEM1WRIE d6hw== 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=LMUHfsEU4k3wAkLBg+Vw5V899iFkD4jcMpKug11/YoNEylaD2IoNXU4MFdWgJL8m5T tedju5MD+lrncb/8p3VLkFJBsiaLBBJkEmu1YsrhedsLBvwHm4DU8QpLPK+jINHzxPh3 ujDXp5TNBna88Y22zAL95kWzkDMXqLvycBP0XFOjRy5kxy7vwMYSQVenL0CHvlqfRGxY xosPJcXwq8SJcEcaGuSbJNWtIU3p7Mntc4bap0M0lOZpjypHTrHfpnfiQHAgslHtrqNY hpKPJwh3LjW0e2A1oEh7Z5ZmIkjFa/OZQcUKsETESyxL5kE/rj319F1elwhvXpUBticF 6QUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="K4F/V7lg"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w8-20020a170902e88800b00182c500d973si33162428plg.43.2022.10.22.00.57.34; Sat, 22 Oct 2022 00:57:47 -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="K4F/V7lg"; 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 S232158AbiJVH5S (ORCPT + 99 others); Sat, 22 Oct 2022 03:57:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232000AbiJVHx0 (ORCPT ); Sat, 22 Oct 2022 03:53:26 -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 63DA72C6E8C; Sat, 22 Oct 2022 00:46:57 -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 DC97660B24; Sat, 22 Oct 2022 07:45:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECF70C433D7; Sat, 22 Oct 2022 07:45:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424724; bh=deb/+f+bTm4Ytyvf8OL7N3yZQGGpLOBi7QxH7ZECr8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K4F/V7lgRYEAH5kIErjgu5qocCivSxvlP0EDYwzIZqrTdxzcJa+IGjMJtK7V8iPwb tztANwH7tbwqUaay/f0D8bINQ0oWOzeO0GuHbfZOIS4bh7sEv4Mt3p3PZi7y8f/Fg+ k2fvi3l26NIQ8XDCYmgxW0o+exNCW3Y1eDXA0MyI= 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.19 252/717] net: fs_enet: Fix wrong check in do_pd_setup Date: Sat, 22 Oct 2022 09:22:11 +0200 Message-Id: <20221022072459.454387212@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747373750865192917?= X-GMAIL-MSGID: =?utf-8?q?1747373750865192917?= 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;