From patchwork Mon Oct 24 11:30:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8778 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp430645wru; Mon, 24 Oct 2022 05:42:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM61oUF2hkGqNIffVGY0bxNDdGh6MSYBJgKUHSlof63SvWQb1Z3coldfwN3DHUWZFIux7ChK X-Received: by 2002:a17:902:6bc8:b0:179:fef9:b2fa with SMTP id m8-20020a1709026bc800b00179fef9b2famr33924583plt.96.1666615322673; Mon, 24 Oct 2022 05:42:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666615322; cv=none; d=google.com; s=arc-20160816; b=FJjkm6E00/pam+MJefbRuDwa8FxRjYEivhR548QHg7ZweEWVgMNRgbO5OAIBrySTmC CiNnI5M+m7XP74fxMmzP+/5eU20nDaQrCpyB7T+bo9MR4F/Jb1BPjZ2aEiVZzEtTAAcg DTVm+AtMHUfi0vmDTmKbneg4dlpV3MrixZ5cfTcnupsj03Ns0wY7uoxSbT9nf0JnV9Lm rt8TbThkHnGDGzLdBYJcGEdR/6R70mXjw5G4Yd1ZlNX6p81ma2l3LBdTRzIRBeCM+tOZ cbdqpT2mGGQILWgPsF52kU8GTwbrGXzQOp0r9yRU56lDQqAjC6/zrbEcxmNy9dWFpY5f kf9w== 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=GBwRYIauJsRYaseoIHEsptHUEDQyOluazgaOjAW+kPxd5/sxf6uu10k9EP+DioSr7M HGIDE1ulcZuqhn4uFjv1qz5CYvxKJvXsKKZmoy87W0GCG2Ewv+W6IcVTNNAJ21UA/AHX N7VA2j9r16v0BX5Hggk3XxQCABUrvuFekmYapgEDBvQkUC00yXP7f9x6JUU/N7rhKLCH Fu7V8OsANtfGebSQHhdeYw7Ep1LQxGtMDIimyrp+4rtVUwsDCKEzy+heSioJRzpC2/c6 XDXg6KrCuz3PBEwhZAic2T/oT0E5TqE9N7IZpz7wf75qK89l0aCjqTPjVOV1F1gYuOvP pDwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TgigPlLQ; 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 69-20020a17090a0fcb00b00213193e7047si2330126pjz.185.2022.10.24.05.41.44; Mon, 24 Oct 2022 05:42:02 -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=TgigPlLQ; 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 S231648AbiJXMcZ (ORCPT + 99 others); Mon, 24 Oct 2022 08:32:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233948AbiJXM3E (ORCPT ); Mon, 24 Oct 2022 08:29:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 843962677; Mon, 24 Oct 2022 05:02:51 -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 516BBB81201; Mon, 24 Oct 2022 11:59:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9975C433D6; Mon, 24 Oct 2022 11:59:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612796; bh=deb/+f+bTm4Ytyvf8OL7N3yZQGGpLOBi7QxH7ZECr8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TgigPlLQVbYgO5449soBZfXp8F3lTBQy6MRK8yMjJaUegaMsWoTSJW3JNBP4RZT5S z9UuM/TqaozYETVO4KqY+Sxih1BOLTu2ISUYJvrxEinJkg2luEilETnAdcyrSAcgFQ b5V5ewqcXf00X1f0tSNZqL6ps5hkCuOvQnvpVSKk= 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.19 081/229] net: fs_enet: Fix wrong check in do_pd_setup Date: Mon, 24 Oct 2022 13:30:00 +0200 Message-Id: <20221024113001.693575220@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@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?1747572828648107777?= X-GMAIL-MSGID: =?utf-8?q?1747572828648107777?= 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;