Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp818246rwi; Wed, 19 Oct 2022 03:25:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM52+16Pu7mGxkbNtmTk0z4QfOR7g21px+YDqvNy1LAx6acCE9Ieiv4QhH1omVWpCCTyb5cp X-Received: by 2002:a17:903:32cf:b0:185:c53f:7459 with SMTP id i15-20020a17090332cf00b00185c53f7459mr7383557plr.82.1666175141039; Wed, 19 Oct 2022 03:25:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666175141; cv=none; d=google.com; s=arc-20160816; b=X0fENAaqPJQLz5KPMjf24RXGKKi8PmBCtfWJHj+LE83tJsHz/MKHhU/iPnGdR630ZF BIIpDYKbFODcZ7GQYgTNSGVaHFsorSwFqQBstQRSiIcuvWLvOZchaXEfUOiOBFnwRw/m 4Ds/DseOrbF9cwyFwrYBivJBEi2aY3f+/x1M77qNY4u7dNlPBw8wb0cqXhWg5z86yvwf yCIVapwTgcypDCTRSFfRrS9g3W7thvsEdoDZWThgKpRXUMNCHYuMmvEW+32F+xkdzoAJ Rohgg0KAeAkXxFen549nnNuHARBf/9F3pYHY2S394tgw/hh4zzH8sJ8OA8Mm1swCZ3CK gO2Q== 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=rOkd0WGcX6/l9QmfXIc5ScuHiOXSqb2v7DMlkGmFQyUfQDUuctXw1yFgyCxjRDUaca CFSUwd9gUsagozv+qQ688QKfXVwyjH5muWlIxF0sCpoEBZKaAcCVVqnV7gVs8rkU19n2 BVBrbxvIMXFxWA0OoXkfS0SRKfE6nLb6U2pVrpMuZt70i39ztctn7+Xx4h0VJuiaQU1R nZBuFXu8YNzSOoHTlUr+a0KN8KJkxR5obNgkNBwVQvNlJCgT9yT6Ju3z+/Y0+O/jr40X ahk4J9Q7SZGX1Ee+dHUlkji4QT0C/ug9hpFE12ET7YyrKNb6ll418PUhFJJXWOTa6Fda 9X6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lTyS4P3y; 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 s3-20020a170902c64300b001865a9586c1si293460pls.59.2022.10.19.03.25.27; Wed, 19 Oct 2022 03:25:41 -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=lTyS4P3y; 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 S231857AbiJSI5K (ORCPT + 99 others); Wed, 19 Oct 2022 04:57:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231952AbiJSI41 (ORCPT ); Wed, 19 Oct 2022 04:56:27 -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 41BA99B847; Wed, 19 Oct 2022 01:52:45 -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 EC2D06186E; Wed, 19 Oct 2022 08:51:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C9C7C433D6; Wed, 19 Oct 2022 08:51:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169485; bh=deb/+f+bTm4Ytyvf8OL7N3yZQGGpLOBi7QxH7ZECr8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lTyS4P3y11/NrwdV3qBGEw0NotbUZiTb8vaNbWBsWrWxXOVEreptwilF5ZVan1no4 3CK0pOgZBAONhpTXK+hH/YKYCqWkzJYpxaWgy0ReTxsq5A3IY135JmmTNpxdG0gDhP 8qFPd52nxrqGtHoqBU2ql78pHsmVU5U+Mdd3ERcg= 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 6.0 294/862] net: fs_enet: Fix wrong check in do_pd_setup Date: Wed, 19 Oct 2022 10:26:21 +0200 Message-Id: <20221019083303.002949848@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@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.4 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