From patchwork Mon Feb 19 20:50:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jan_Kundr=C3=A1t?= X-Patchwork-Id: 10229089 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 71F2B602B7 for ; Mon, 19 Feb 2018 20:55:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6058828C2E for ; Mon, 19 Feb 2018 20:55:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E9AD28C05; Mon, 19 Feb 2018 20:55:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98A2C28ADA for ; Mon, 19 Feb 2018 20:54:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932256AbeBSUyj (ORCPT ); Mon, 19 Feb 2018 15:54:39 -0500 Received: from office2.cesnet.cz ([195.113.144.244]:54452 "EHLO office2.cesnet.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932067AbeBSUyi (ORCPT ); Mon, 19 Feb 2018 15:54:38 -0500 Received: from localhost (unknown [IPv6:2001:718:1:2c:15f8:b813:1f49:2432]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id 0896E400052; Mon, 19 Feb 2018 21:54:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2; t=1519073676; bh=dl+ViDUIJJsTXBhx0Y03oRVJPDTe1gvc68JRbittTKY=; h=Resent-Date:Resent-From:Resent-To:Resent-Cc:From:Date:Subject:To: Cc; b=ReGqIyJMFS4MoLa/aT1oEq1Wd3xFkPWITzq/ClbEtIxSF1YASP8QOq98zPU8NwAQJ IBjUgUCkjUgss2jib08kKy4c+tbfwCPaXeyxgkDNbDtUblf/eOqKQcDZ1RBcJcG/5X oIw02ytu3VdT8f0xFkh3pEjc3SeOPQtBC5yPDXWY= Message-Id: <8e3a01eb43fbad9e76a75c3f368bf4a74a56ca1b.1519073475.git.jan.kundrat@cesnet.cz> From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= Date: Mon, 19 Feb 2018 21:50:21 +0100 Subject: [PATCH] pinctrl: mcp23s08: Fix MCP23S18 regression MIME-Version: 1.0 To: linux-gpio@vger.kernel.org Cc: linux-spi@vger.kernel.org, Phil Reid , Linus Walleij , Sebastian Reichel Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In commit 9b3e4207661e I introduced a regression on MCP23S18 where probing would always fail with ENOMEM. Unlike the xxx08 and xxx17 variants, the MCP23S18 does not support SPI addressing, and therefore there are no duplicate debugfs entries for this particular chip, ever. That's why this code should not care about the one_regmap_config being NULL. That variable is not used in this branch at all. Sorry, and thanks for catching this early. Signed-off-by: Jan Kundrát Reported-by: Phil Reid Fixes: 9b3e4207661e ("pinctrl: mcp23s08: spi: Fix regmap debugfs entries") --- drivers/pinctrl/pinctrl-mcp23s08.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-mcp23s08.c b/drivers/pinctrl/pinctrl-mcp23s08.c index 4d2e1874710c..c873747eceb3 100644 --- a/drivers/pinctrl/pinctrl-mcp23s08.c +++ b/drivers/pinctrl/pinctrl-mcp23s08.c @@ -821,8 +821,6 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev, break; case MCP_TYPE_S18: - if (!one_regmap_config) - return -ENOMEM; mcp->regmap = devm_regmap_init(dev, &mcp23sxx_spi_regmap, mcp, &mcp23x17_regmap); mcp->reg_shift = 1;