From patchwork Mon Oct 24 11:28:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9773 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp554058wru; Mon, 24 Oct 2022 09:56:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6x9UixZSnAkO63HUIWkc63Dyh45KBP+QYfdcWpYMWjdKClDw2GA3l9hNsdd8XmbqoBdNVH X-Received: by 2002:a17:90b:4b47:b0:213:35c:c035 with SMTP id mi7-20020a17090b4b4700b00213035cc035mr8924766pjb.52.1666630572276; Mon, 24 Oct 2022 09:56:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666630572; cv=none; d=google.com; s=arc-20160816; b=guzDfx0Moku4hvVS2plsGhKvFVGBEOwdGlVhVG4DTEr6HfP3LaEIYpzN0rlgLNQWuZ 8l49aEHLwjc7VTPfIin+hhU9brHm62jVjtIXN1ops4ZERtGmYLqnsr7NIAHIqCq5x38Z gGi/97xhhmEpjdawBRLUcExuO61BmsqWGdVJgDhrcnBQPc5aXfXE6Kw/13FPWYhQdBsV ittTVDkjXKBLy1trrpc20LdkmsP2wR0RhpynFPPgVieYg/gCG8vJ51Kg4V8O9wkH4PeX nnZgOhO3vEzg5ID89TrRiVhAeVjkTExPSjONvTfle1moRlJV70VRTJCBeY6LWxcs52TI vRqg== 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=JXNqooOPuXPd28Hph0CfSgH4VNsgmVLBNio/BgRGZyu66Rsd8QcWCLkuTAMVKzRyB1 HWZx/lEnZ4875SN8GueyQSwaziXlmMzlGlO8tqWuVW0N5KQ7E4/HKCEhOksY5bZleu9f bCEt3GbYCsh+9MsNFiLHhlGVWzA2/6hOYgV5F0MKgYWhKXMIxIUyLGnq+sg3JGLfIOmU 2fucIbJI6ZnnU/3fmhhMgyjqjGVt94rrRp0qOUTz+cbTx8X01Pv45iVW9pd+8Q5Vud/R qa4zZTAWhwGKadIEytFbIVMSsBCOX3N1jtcdNpeWnvWt1mpx8y9MFiUaL5+WL4IGPBsj xzTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="DN/lieAc"; 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 p6-20020a056a0026c600b0056bfd285876si180300pfw.84.2022.10.24.09.55.59; Mon, 24 Oct 2022 09:56:12 -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="DN/lieAc"; 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 S234912AbiJXQr2 (ORCPT + 99 others); Mon, 24 Oct 2022 12:47:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234979AbiJXQqY (ORCPT ); Mon, 24 Oct 2022 12:46:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD48E2126E; Mon, 24 Oct 2022 08:31:17 -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 1E125B81978; Mon, 24 Oct 2022 12:40:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C52DC43142; Mon, 24 Oct 2022 12:40:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666615245; bh=deb/+f+bTm4Ytyvf8OL7N3yZQGGpLOBi7QxH7ZECr8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DN/lieAcRAFa8ZvajPzg5Tt1csucpAjbeQbs6DcArWWic4ZVo7r9bbyWymy/6VmkV pqOSOdy1A1PjHlqhuy7aUpQURwbC4S5A1vNdxDGchws84lX4bRayFIr4W1QhhBDAQn Z8gOxzgcchv9sqpWu8GUgmXjiNn9HWGcCInxXxNI= 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.15 178/530] net: fs_enet: Fix wrong check in do_pd_setup Date: Mon, 24 Oct 2022 13:28:42 +0200 Message-Id: <20221024113053.085636116@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747588818808480185?= X-GMAIL-MSGID: =?utf-8?q?1747588818808480185?= 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;