Message ID | 20211116062328.1949151-6-colin.foster@in-advantage.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=vwZw=QD=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D397C433F5 for <linux-arm-kernel@archiver.kernel.org>; Tue, 16 Nov 2021 06:29:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 45BFB61A0D for <linux-arm-kernel@archiver.kernel.org>; Tue, 16 Nov 2021 06:29:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 45BFB61A0D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=in-advantage.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zFuO879KiYy+r9pxJrbN9t0txgE0oE5q0Utm6K4i5wc=; b=IS/9bh7vRimEKc 5d9lUn3aJnfLZtgUUYRQKNIhNBql4LyVA47ubLOgmqLRS4VuJs0rSLmVzNhHXT6YWu200AIG64v1W dYkcBtVqVXHO/cJj5eTk++9SBDiR0QvhF4s6NUwD+g4BGodr5FOmX5DfjJU8izgfPRB85mSDjjlTn XkwhfaeaHgvrMAKHjzdn0KIuYksJR2/O1vPCIVeMOnrKZ4UcsBy093RaD4CRkd/DGEHCMvh0gHFqu waPEVZ2jDv29PGtCt5VI3hLVvkO+kKWwBBQfzTpoGVDx86BHxCEWSA68fI0A+HHa88IqbEIhZVEEq fCJLxOOhr4sGupiDHWuw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmrwS-000PGK-Kw; Tue, 16 Nov 2021 06:27:42 +0000 Received: from mail-bn8nam12on2092.outbound.protection.outlook.com ([40.107.237.92] helo=NAM12-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmrsp-000NpY-SO for linux-arm-kernel@lists.infradead.org; Tue, 16 Nov 2021 06:23:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MLoPhFABwMDVezcn+dd286h53Ktidyl71uPVGu+QolOiAnt9gh1CQ4QOUxvWcOaq2QLYPvjGM8MAeshGOHPg34GXEKhf+gBMFQX7TgNeQ/QKRb8KDfjfZWWs2JeJsV7eVL928TBPv42lZIhu4yKOTt/Ha//aSafo+G0vXLszyJ3kAbWMX5OpzjmCCT+HqYEF52CjvfYWTTusNEG7KHF6TcvTmRktIUjxIURRgtBCUe7GVN1LvG4yZWKXXqPcCe6lxWnlhyAxSZAEINx3jziQtNAi0bCWLPV6KcFAfwOGo1wlhsrXmGoApE7tk4xqut+TjAgZr+oFJ6sPyKv/2JCkug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1l73FUOfTXGsUNS5WNZu7qMSfIq/CYlA9/HtYXWFjUE=; b=nND+KV6i7r3IuC3QP6CE1wVBgFLAFsvA51ENmEaSZ+ytkTL+Lp/SKxCgXsIgPJQBT4Plxaq50skNVn2SgRBYXiIYRzFldzFJOqLzv1qz1NZvQqoq8L0H4f6jgZEvlea7cHervK1B0ct6b+fK2CTnUseZfrvsA1ZsgpX6GztkkkNOgRThgxgfIB/pBWd5iixC3Nb6mFAgT5kJPuZrz159qQ4/0ZAOm2jSTCrZtWZxEMd/526m7Chw8rgX3WRBqYlfs8QtIZ6Y4jGL7+GKjZ+EPgMYDJNKAK388RkUm0RR4iZTdoSyW+hY8sXNlH+S4Zt5dWc9tWYU1HZJ1nj9mYMy3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1l73FUOfTXGsUNS5WNZu7qMSfIq/CYlA9/HtYXWFjUE=; b=e35FYV6Yvy9MDTlo/C5DiEjJ0Klib3YAEUekP1iREWoacq6iUuzq6LsDxNAcXyMCg1R2KUpyjLAfEVlweMShBuinvAb3EdiqMI7cG/7msixQH3IoQTRFZSD+uF+KY621N2lL6uXzwIFL6vBqAin28FvdZINGSDWxaB60xcmmz34= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by MWHPR1001MB2383.namprd10.prod.outlook.com (2603:10b6:301:31::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.16; Tue, 16 Nov 2021 06:23:46 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::6430:b20:8805:cd9f]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::6430:b20:8805:cd9f%5]) with mapi id 15.20.4690.026; Tue, 16 Nov 2021 06:23:46 +0000 From: Colin Foster <colin.foster@in-advantage.com> To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Vladimir Oltean <vladimir.oltean@nxp.com>, Claudiu Manoil <claudiu.manoil@nxp.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>, Vivien Didelot <vivien.didelot@gmail.com>, Florian Fainelli <f.fainelli@gmail.com>, "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Ioana Ciornei <ioana.ciornei@nxp.com>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, Lars Povlsen <lars.povlsen@microchip.com>, Steen Hegelund <Steen.Hegelund@microchip.com>, Linus Walleij <linus.walleij@linaro.org>, Philipp Zabel <p.zabel@pengutronix.de>, Heikki Krogerus <heikki.krogerus@linux.intel.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com> Subject: [RFC PATCH v4 net-next 05/23] net: dsa: ocelot: felix: Remove requirement for PCS in felix devices Date: Mon, 15 Nov 2021 22:23:10 -0800 Message-Id: <20211116062328.1949151-6-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211116062328.1949151-1-colin.foster@in-advantage.com> References: <20211116062328.1949151-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MWHPR11CA0028.namprd11.prod.outlook.com (2603:10b6:300:115::14) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 Received: from localhost.localdomain (67.185.175.147) by MWHPR11CA0028.namprd11.prod.outlook.com (2603:10b6:300:115::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.26 via Frontend Transport; Tue, 16 Nov 2021 06:23:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b8b16ef4-2d3e-40c8-aef9-08d9a8c9a4fc X-MS-TrafficTypeDiagnostic: MWHPR1001MB2383: X-Microsoft-Antispam-PRVS: <MWHPR1001MB238355E60A294E9C775575F3A4999@MWHPR1001MB2383.namprd10.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o+TXQZuuVQsISk1/K8kYdq3If2tq3Ygx5wue3nIFJHsXDJOPfPUTMlzO6ZqRUQKKrsSCQU/5UNTugJcdOTOB/c6VkioWG1VQvfUvbLIm9TbIjgdpcWQNoue6JBEe4WYPF0KgkiRvp6Vt2lzD8XL7IDMPcLLMMM9eqAaDRoSyJRAsGUFmx9CU1gu9qFxgew+dWDyqg/pRapsIEvN2BB+yt7pEoS9+THMPZV4oMvfSL/vo3jDXdiCvISSU9nHbz+/IpgFGve9z2OOjnX1+duAjEE11spETcBCX5xzzn8UuABhrmbR9Dwp1JSNxdGadd3JLLe2nIcksGHANf4Jn9nqcZF7Thiff6ch/z7ggj4Q39geTPYGeEOLn235J4Ikm5m6lZj0rP2fd6NxR4s25q0QDQz4QYQQsRzRMN9w7QsSGDuIvZSzQm0Yt0ljDrwdLewg5ZNjea+NwUMJbt018rlCYwOSZ6NqKHY+VVylB/Vi+4rZr8r57a8ohDD68Kk/ewXQD7MIGyp+eary5g10JCBZZQR93BxOafQZ1psjHpwIBhZXAlUh+Y7eprqQY5RcAnia7nWOn9ouQV2O+8n4WT67qg0L7qsIdUDSZlNkRt3OYU8OYJtFrnPaeDCOrc46KN3op9EuinXmjFdryY1oD4VEE6KyVdBh63CZ9cJgwCIzV2visyrul4j+zczbfqssfKu6kvgPUrHuuAwa0UXAhXGv9sw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1001MB2351.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(39840400004)(136003)(366004)(346002)(396003)(6512007)(54906003)(316002)(4326008)(83380400001)(8676002)(86362001)(44832011)(1076003)(2906002)(66946007)(38100700002)(38350700002)(508600001)(956004)(26005)(66476007)(66556008)(6666004)(4744005)(6486002)(6506007)(52116002)(5660300002)(36756003)(7416002)(8936002)(186003)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Q4HE21y+flLrmutA2vHKeSWMBqCAHu/BQVxWMBpWq+FfwDKQmfJW3VdwTVYnQuA8HsNSlO42s/gNDdP+3AK52/qIOnuoUAcx80NzYrfXdiX3ZnewN1jiX31PzQHqSBx14ZTaV56CbvjJS168V++g9Jva45jmoPRyoPJJbNkoBXYsyGZg9ubwVUQo8E4JblJkzwoOKAHzH4hSupWufieQe1FqIX+Ltj3n+o5DyL5nh68Ul6yRUegX5hUHFRsON4SZ9OXbvCITytQ3KPnMPrk2VyN0KSGcjbZjsoh4gYLNF6vRmt9UogsrtKbtPWPSQOnBexmt1m25p8vKLgx3ZwG9SHDjDiwLKX7xCYU3B5zowKdQxmRmLefu5XmHQlAj+Xje+kzcgtfBeHpZwSeIcT7IJxnpyHD7lcxoL4DUL2c27yHppAaeXfE23DFobfKjtzHHT/KUESbPsM5O6gpNQdiE2m1XyP3xH6Bms1BLQuiow8TXLYTFmplZkNVFV5RsRNmtXHkXUasAYWew9v6PqNl3n4jGQ4gjvqLbcaAir7d8Al31VCnufG86tVfBjRwyBuXJdE1C8Jbxd2yoGFVmcWtIHk38bhIHEeyW/tXOfAfc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YzOLZUkOpBm0TavwTh5tKymywgIo= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8b16ef4-2d3e-40c8-aef9-08d9a8c9a4fc X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2021 06:23:46.1300 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jIMUoFIvcDTew9fHwKdmaYZiof0uAolbpj3EyaBmnhDSWFvmMsuIqDep2SBoddOI7NkB9lMtOvzQ40FifKB1ecv96Gbgz+hCP+xght3NLUQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1001MB2383 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211115_222356_002088_6C23248B X-CRM114-Status: GOOD ( 13.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
add support for VSC75XX control over SPI
|
expand
|
diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c index 327cc4654806..94702042246c 100644 --- a/drivers/net/dsa/ocelot/felix.c +++ b/drivers/net/dsa/ocelot/felix.c @@ -820,7 +820,7 @@ static void felix_phylink_mac_config(struct dsa_switch *ds, int port, struct felix *felix = ocelot_to_felix(ocelot); struct dsa_port *dp = dsa_to_port(ds, port); - if (felix->pcs[port]) + if (felix->pcs && felix->pcs[port]) phylink_set_pcs(dp->pl, &felix->pcs[port]->pcs); }
Existing felix devices all have an initialized pcs array. Future devices might not, so running a NULL check on the array before dereferencing it will allow those future drivers to not crash at this point Signed-off-by: Colin Foster <colin.foster@in-advantage.com> --- drivers/net/dsa/ocelot/felix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)