From patchwork Mon Oct 24 11:30:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8602 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp419537wru; Mon, 24 Oct 2022 05:16:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4CSi0ltFwTrK/9wRb9ITwMhL9m3exkbDoIcLh08+/5L1+AL1GXxsZfKJOunCYl/dLazsY3 X-Received: by 2002:a05:6402:1045:b0:461:a28b:17ab with SMTP id e5-20020a056402104500b00461a28b17abmr7055134edu.90.1666613789146; Mon, 24 Oct 2022 05:16:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666613789; cv=none; d=google.com; s=arc-20160816; b=f6yV5gb20uH3Iaq1DEFwkGo0XUbXvFMuQHJNySOohUSNGU32nAcqTkMpJSjVXZw+je xMkMq4piMp4LEPXpZ3xeGFFb3ZpCohe9foOn3lCvIOsxNJIyjOBAHmVWXmo1cByJOlyx 4Eis+6uhxgVpqyzrMYeSS4G/5s1BFSZA9uqO9oDhbundd228ul7eyUM3JcUBCog7JtwW QdgI4NlCs0mxdF5/ZTNimmmWZ9CVWyob3n/RI2CuEYB0ZTIfTFQ3Fbys+jizzPof8Gfb AYRyyHwt5HVJcbTLP3dVban2WIzdAet02XMt8bbwG7uzPray48mx2D/imVsDYXJgGjcV rAhA== 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=vyfzmYw4dH/v/K9tgtBplFfExoY0PnhJZuQnTklGm4M=; b=I0rPIlTHC2eQ7EsUhuApju+JiZl+/Leyyhzw+SDK4Kbkvhq1YigvUv9cZO38t0A/FE Haj0UCOs0GchhlrWDvapXwSA4iUsV3hOfBQZF5FfA1ITj8evNBxuUGS7BzOhhgssdNYm bceqhLYj0ri/9H1znR1qXizi/f9B7cfq8TkJ5s80+nVmFrn2CUUcF0x9QljUQ78inTg/ nyJa4ITnnqNLfWVcVDhbElAT0SBdwqH4YQgwfzKaKSpGnjBTCB8VZZGQ1S/QfnyvwqIg vsQKxyzTKobbw2tWfvooyLl44aVWWP4/T8+5h0iZoMs8EK6Qt2YNiZ7UO7B7Z2W7ffCq 1pZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NnJT+iCx; 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 g10-20020a056402090a00b0045c97ee2b01si31318232edz.616.2022.10.24.05.16.04; Mon, 24 Oct 2022 05:16:29 -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=NnJT+iCx; 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 S232651AbiJXMIF (ORCPT + 99 others); Mon, 24 Oct 2022 08:08:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232443AbiJXMFW (ORCPT ); Mon, 24 Oct 2022 08:05:22 -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 725837E01A; Mon, 24 Oct 2022 04:51:30 -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 E2D6C6125D; Mon, 24 Oct 2022 11:49:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0167EC433C1; Mon, 24 Oct 2022 11:49:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612152; bh=vzp4zjGLVhDVa0u7CdOhbS2grFwfTsE3U0IxFxDxyr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NnJT+iCx1Mj2ySrxEd1I6+PrZnEceAhAjUtd5SKaWTSsGqfRz9BMVWK4bFznXyy21 MbCDIOP1JiRVZICkJndGx1V5udkLHitbovaQLtYe2DBUUyRiCz1DK941aYV1CGinP4 XLQl6LCwPfdB5Nj8lcwtX30ZwE+xU7XdNMbGWCsQ= 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 4.14 089/210] net: fs_enet: Fix wrong check in do_pd_setup Date: Mon, 24 Oct 2022 13:30:06 +0200 Message-Id: <20221024112959.931421842@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112956.797777597@linuxfoundation.org> References: <20221024112956.797777597@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?1747571220322884758?= X-GMAIL-MSGID: =?utf-8?q?1747571220322884758?= 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 1fc27c97e3b2..e52231cfcf77 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c +++ b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c @@ -97,7 +97,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;