From patchwork Tue May 23 16:05:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 9743007 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 5E9B3601C2 for ; Tue, 23 May 2017 16:05:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D0C928665 for ; Tue, 23 May 2017 16:05:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41C7028699; Tue, 23 May 2017 16:05:44 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D6AA528665 for ; Tue, 23 May 2017 16:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=h5I2OdDPKOZPmqTbsE9oKdNp1uQurMJwLJEONw42W70=; b=HeQ VINmij0I9IPXFkia+cIfjsTNOiaHtqP1iDXBabqqyAgQAhEjagA2m4txxAD8LRWMTu9HvwltfvIqx 4dcHI3yh+BNHkbak7GMv5GxAPtj8QbUdx3Y5tnw0Fqg+wKdIb6WXI3feGPxstacs0UyqDsiaAz4Pn qgzTNFohMrIFNR9AjxIoXLfqdf7lrBtn42CcsLVoYnCWH/wVLK1H7GZttmoRfIfD2O4TdSR8e1PIJ nzk5IqLzsVDVsS1ouzgaig9NxI+ZWG0LZqzMMXLZ3ACp+pynkOcLue/t2dMxYYqN4KZuO3CDDfsrZ gcvxQLJiAI37cxFv3F6nip437EN0ttg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dDCJR-0006xX-Nu; Tue, 23 May 2017 16:05:33 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dDCJO-0006uu-M8 for linux-amlogic@lists.infradead.org; Tue, 23 May 2017 16:05:32 +0000 Received: by mail-wm0-x22e.google.com with SMTP id b84so30631896wmh.0 for ; Tue, 23 May 2017 09:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=DnGWeuoIBsC9YiW7NRCt6WtMDsEz4o124mhL0AGdb90=; b=lgVyQ5V2NY5IjPMZ3+ipzwg7WGDigFwcL3rUlbYtWHfF55JiJ6lHDUmKpNKXuHg6rj daXnbfTsBz2Aem3tWp9ctYDaOIc3NtiQxqmCOrMpPfWRqdo8eF8pE8EILQnoEluH6EJR BCadyBW1qxYnvEKeYeecr4SGPxdpjszAisK2qYfkooyJ/sJ3x5LiV+fquTU1iPn1p/rF RrY87mLEn+0EPgLT4zd9LPXEmqLSZkREyqHAZKM4Yli7oqoGEkNw3KhTuBo1WWT59pH8 MhXW1aLz6ediifMUC5EsMT+Lu1e3r4MW9vgwuvPQj3piUJfyzkk/b6w/rFx1eF7Xmsc2 0Mxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=DnGWeuoIBsC9YiW7NRCt6WtMDsEz4o124mhL0AGdb90=; b=M9Xxuh8qiDw06fbJZmaRQ9jHmZOnch+qiqrDJg/iIRNwQQxPqsArBMGJhAFD+AM1Ca NdD1HsVtrqfr5t0H9qx6P6OvDo8q9h4TAei2LASn5Zs/wZPQILJvNWb+igdW6AZ92tn2 RZHx2xX6jdFZq64ySKXz5HQmb/k4KcsZL/TIjoWCmIbqGMLeHcBK7LdM15cK1x5pHxSu GdolBIn70yxTbcou3agL7a3vkM+KeigEn2ThnYaYfsgSFN90bGmxHUtDVfyvqZNiZPLE 31qfGM/nKQgW0u+uX0FDTjZaS8ofj01cYEQOCSpnPG1hSeATANmcegMecjBiXGIqeowY NztA== X-Gm-Message-State: AODbwcA7g+dM0tUKm6qQGp2PyKOuCAEKbd7MoLPZoHr7lqGA/4CV/NJT 3mS97CBM4rIybFci X-Received: by 10.28.230.84 with SMTP id d81mr2830493wmh.19.1495555506459; Tue, 23 May 2017 09:05:06 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id h123sm1484433wmd.34.2017.05.23.09.05.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 May 2017 09:05:06 -0700 (PDT) From: Jerome Brunet To: Thierry Reding Subject: [PATCH] pwm: silently error on EPROBE_DEFER Date: Tue, 23 May 2017 18:05:03 +0200 Message-Id: <20170523160503.16920-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.9.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170523_090530_884521_2D715980 X-CRM114-Status: UNSURE ( 9.63 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Jerome Brunet MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In of_pwm_chip, if we fail to get the pwm chip due to probe defer, we shouldn't print an error message. Just be silent in this case. Signed-off-by: Jerome Brunet Reviewed-by: Andreas Färber --- drivers/pwm/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index a0860b30bd93..1581f6ab1b1f 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -678,7 +678,9 @@ struct pwm_device *of_pwm_get(struct device_node *np, const char *con_id) pc = of_node_to_pwmchip(args.np); if (IS_ERR(pc)) { - pr_err("%s(): PWM chip not found\n", __func__); + if (PTR_ERR(pc) != -EPROBE_DEFER) + pr_err("%s(): PWM chip not found\n", __func__); + pwm = ERR_CAST(pc); goto put; }