Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp471595imm; Wed, 29 Aug 2018 04:46:02 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZhLMOy4td/cuREV86HU1tqVLLMJ5e/X7DSaWCVuPiGRKWbkF8bEBFv7EWJCUKj8eEM6WAE X-Received: by 2002:a62:cac5:: with SMTP id y66-v6mr5599143pfk.187.1535543161940; Wed, 29 Aug 2018 04:46:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535543161; cv=none; d=google.com; s=arc-20160816; b=ei5CxIICpxUYOznK4F4IQcw7v53E1tzXjDB1lb0DuEXZeGwJxyBM5Lf8b+iX+d8FOc MKpeTWI/saNH7p4J+jT5fiFZpBmao8NF5VYwEKY4JVBQdvLDwzQckBRDfMkd9wnPwQKk WkVE1OI3RFNTtgXBZAgjOTVn4smNKZ749ySKksTBnn4GnHcPkITyUrVukhqlVMaixf0+ TI5sy4c2g2gW2Ai33TyCLPxO7HLseczlDaniZ2w26ZKjJQd/S7RKoItvf04vB7idFx32 vxjiU5R6ZWuOsloX1ecQbgDnlkIAZESNtmm2cvEV/Seof3rHDbhgy29D45EOic3IQ7Jh Tpeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=O+mhCh7Yk3jj00hgT4skmtSA0mkKqWTgWYNIrdFxM5E=; b=Ec9qwSZPgTC5zRMNapd7tlwwjp34VN0/f6Le0aOpxOKpWc58liv6mlaLtArxIX/q0U QzKnpjR1E9o7qspVMDJnbhlKvbMRzS/IMWjaJ4J2pJDo44dEeuDAyNzwJWVbE04DrtI7 YolNYCVVC3Dga6o7hdYsWwVmHOID28iLaxLJ9iHSMbWluD1FWjo/p3+g5ecBOywpscWh Ife0WAGD33P6czSriZcPqIY270bPGV3yc92cxf3hVRsxdoIPCZr2Q/naykle19BQGZzD 7x8kQwx39wo57HYUaK+GQEjzNUQujK8oY5gEB8pnxk3T95XuMm5jVMGpXf+KlG+0hULY rVBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VgUAh9w+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u207-v6si3498952pgb.640.2018.08.29.04.45.46; Wed, 29 Aug 2018 04:46:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VgUAh9w+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728434AbeH2PlD (ORCPT + 99 others); Wed, 29 Aug 2018 11:41:03 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:36574 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728255AbeH2PlD (ORCPT ); Wed, 29 Aug 2018 11:41:03 -0400 Received: by mail-it0-f67.google.com with SMTP id u13-v6so6814491iti.1 for ; Wed, 29 Aug 2018 04:44:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=O+mhCh7Yk3jj00hgT4skmtSA0mkKqWTgWYNIrdFxM5E=; b=VgUAh9w+soHChMBHhDwSdpDaUfAB7qv6mZjdIZdWz+5G3JF7wjjh992fNeZq3n/Lgw JlmtKoGSNGwzBpgENYOVSd6NqwysosG51x0lDcz52YYws0ubMkGHu3ZpNj99WepABLtQ 6QLdqp4V1KNJskaSg3ffqkgI6YyNgVq5xqDDQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=O+mhCh7Yk3jj00hgT4skmtSA0mkKqWTgWYNIrdFxM5E=; b=Pm7tROB9ADhRUBrBxApCC4Xl8fIM7sgJqyQ84OXb3SJSFTw/WF65WJkVsXjw2pn/ro oPYmlxssw/aboQU3zQcGh2j2MKFpXoxCE5TpZNebRPKZWLYKvNmRCC96KmDqSyW5HWIN IgL1Pxyk4tMSi7KXAvCFkhBFg+gmO3bqoWiSL0/kNj6uHZjn6f5hwYe3YuWXkSJSh3HL rPUWFO7jd7WyaRyY0Gj1t9t1fpr24txuPuEw5DeqPy1inLoT1LtJv06B26zcnzeFpao0 rgvRI10G3PXEA/puFGVfaCIMwJmzhGcjuATlqtIUdzI87JUp86ZgK4agHqArHMv8owVK zFvg== X-Gm-Message-State: APzg51DXLrYsbj5HkEyTuozwRG88YDar5N29FmE4Q2onPevy7sEM+q7+ wv4qkd5dUqgNTu/orHCZYCzZXyvHD1oHbXeBZpDrvQvy+xo= X-Received: by 2002:a02:6c45:: with SMTP id w66-v6mr5000454jab.87.1535543071369; Wed, 29 Aug 2018 04:44:31 -0700 (PDT) MIME-Version: 1.0 References: <20180825175328.16687-1-paul.burton@mips.com> In-Reply-To: <20180825175328.16687-1-paul.burton@mips.com> From: Linus Walleij Date: Wed, 29 Aug 2018 13:44:19 +0200 Message-ID: Subject: Re: [PATCH] pinctrl: ingenic: Fix group & function error checking To: paul.burton@mips.com Cc: "open list:GPIO SUBSYSTEM" , Paul Cercueil , ext Tony Lindgren , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 25, 2018 at 7:54 PM Paul Burton wrote: > Commit a203728ac6bb ("pinctrl: core: Return selector to the pinctrl > driver") and commit f913cfce4ee4 ("pinctrl: pinmux: Return selector to > the pinctrl driver") modified the return values of > pinctrl_generic_add_group() and pinmux_generic_add_function() > respectively, but did so without updating their callers. This broke the > pinctrl-ingenic driver, which treats non-zero return values from these > functions as errors & fails to probe. For example on a MIPS Ci20: > > pinctrl-ingenic 10010000.pin-controller: Failed to register group uart0-hwflow > pinctrl-ingenic: probe of 10010000.pin-controller failed with error 1 > > Without the pinctrl driver probed, other drivers go on to fail to probe > too & the system is unusable. > > Fix this by modifying the error checks to treat only negative values as > errors, matching the commits that introduced the breakage & similar > changes made to other drivers. > > Signed-off-by: Paul Burton > Fixes: a203728ac6bb ("pinctrl: core: Return selector to the pinctrl driver") > Fixes: f913cfce4ee4 ("pinctrl: pinmux: Return selector to the pinctrl driver") > Cc: Linus Walleij > Cc: Paul Cercueil > Cc: Tony Lindgren > Cc: linux-gpio@vger.kernel.org > Cc: linux-kernel@vger.kernel.org Patch applied for fixes. Yours, Linus Walleij