From patchwork Mon Oct 24 11:30:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8460 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp402800wru; Mon, 24 Oct 2022 04:50:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6JAgM2lPNnLeYDVrPpwrXjHbFSp6gPMtDSnn8edkSTShcs2YZi9KTdq59AXIfyfNJS7eXO X-Received: by 2002:a63:7304:0:b0:46a:faa5:700f with SMTP id o4-20020a637304000000b0046afaa5700fmr28843536pgc.253.1666612242060; Mon, 24 Oct 2022 04:50:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666612242; cv=none; d=google.com; s=arc-20160816; b=BWl4qQssiKo/KWG5OGykjtkmohUozxaHpu2k7g0eEnhE3unIHXj34ZWSAuFJse6udJ ZUxijAjTes0x3ygbsh/kpHfDUVLsZItmCfCC9+N2vXw4kxPQd++p6gbTEOgtaVixKUi2 1Aljf9PcVDOqeDlPzD5jkAq9cTvdizQnIXKhp+1ZLqnMn0y+xJ32D5bd5um0xjcDm5XC R3C0U5yGsWd2BV8QSN5qOK4YLQfbUosMG4jsQdOHMRuW3CLG6x45F20jiR1v3EWONYQU FEvSQ82yVLx3Vhwtgmp4lkwcY6A15xxBH2b6+iMDpGfBWDkA+Q9dNR3n6Drdok6EKsi2 bHuQ== 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=i0Y5Q7r9iZOm1OaapVSSJllBdxSIe+INKjpuptXNuGE=; b=Kf39O5/rtXKGpKM2UbZWxrkViKq6dWgpFl19Q0jY+rYmvWB5hKjBnVnmYBMEhtFhkM bfbr9KgHHb7FFsZmMGgP7RoXiMRng4kqFX9cBLNExoZ0tZqN082qz6FOhWFvOUgHCM1a wPVarC2uSPraq8Y2BXUrlYfLhNzPfmRWuQHUm+ZDE0QlfK4ajWx003/AGNVypXvFIbVJ IkfdkyZQYNkx/w6kaRxaLerQiUee5QDfWXZXPniqGv/6XT1Fuia8zvZ/cC+i4biva8Za 6WwrlFx78CXBbv7rtdbf2eLsxyka2DlQEN3E6x5YrI8/GcDLofdB2A5pegz9vajacKaY fIMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Gw4W6SaK; 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 l15-20020a056a0016cf00b00563856be5a9si37814216pfc.351.2022.10.24.04.50.28; Mon, 24 Oct 2022 04:50:42 -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=Gw4W6SaK; 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 S231812AbiJXLt7 (ORCPT + 99 others); Mon, 24 Oct 2022 07:49:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231469AbiJXLsD (ORCPT ); Mon, 24 Oct 2022 07:48:03 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBD3375498; Mon, 24 Oct 2022 04:43:22 -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 sin.source.kernel.org (Postfix) with ESMTPS id 0E7FDCE1347; Mon, 24 Oct 2022 11:41:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3213C433C1; Mon, 24 Oct 2022 11:41:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666611684; bh=sqTMI2uzq+tJJsADyinqpqGIOCnAbBtqJym8Q4S4XDQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gw4W6SaKcWNLVVEsa/nFTC5CImbl4ubmYkNTNTVwANdV6rchnMns5Bs9+YBI1aNXp K3vmM9rMY/KJV1rGVn9HDpkq/zXaatQRzUgvQpmrv0BaqwdylyohE0tkqnU39CsZNd ZnDkQXQF8h26w5HZ2AjSVI/jqUc24bojIFgfHAMw= 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.9 071/159] net: fs_enet: Fix wrong check in do_pd_setup Date: Mon, 24 Oct 2022 13:30:25 +0200 Message-Id: <20221024112952.057380713@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112949.358278806@linuxfoundation.org> References: <20221024112949.358278806@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?1747569598412954435?= X-GMAIL-MSGID: =?utf-8?q?1747569598412954435?= 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 777beffa1e1e..7861a5025dfb 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c +++ b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c @@ -103,7 +103,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;