Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3341748yba; Mon, 6 May 2019 22:51:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/da3NXjTAVkrGQSfHAbwYzLuQ8U2bzrZ/IRcn9eb1t10s1VoC0wCbrRZrjrBs/+gw1aJe X-Received: by 2002:a17:902:a510:: with SMTP id s16mr12964436plq.334.1557208280253; Mon, 06 May 2019 22:51:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557208280; cv=none; d=google.com; s=arc-20160816; b=oI7Hs9bndGFUMaXSM9iBaR5+bCpd8bexjqHXR1enFeX8foK7u/mBonfPPFP5WDlL/S hnC5eios5NHy1CUKAKOreYcDh4LfS4CgTAu7x3a58zgSQAKhavHg12+5QEWXW4H7WIlk Yk14HTVxH3uHBVNKhtD/z8pOs6xjNYfYJtcYIilaV6VrBJnGL32Rea25mzqqwmVClYK0 eTXlMIZRDuqu0Jlps7MNygWY8ix1vuzDD17AWpIXKPkdiCiXb1anCuR+wMgdx8YJIQPl PXb/3GALEp9ikX8AHMEGGhAYfdzvrZ6LZv6Wgys307oadDAZQxFOVwuQ5wqtihJvNpFe NGcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=La86FseL7mOD5DQ1UfZIkLAVP6TN86xziediJxJkXMc=; b=egH2KueR/gz5IVra9acWOUTqql9z1SSY4F7OoqprsQvp6/MA8LdVHLaHQV/Q9LQEZ0 z/nszhvNKj26AUJzyMrxDv7daczIl1Z7zj2ajNHSrZiwlf3jEBE3yQ9TzZKW262EIMGp P2b4L7oJUf/o4ugZ5tPpntXq5pJErqsKakRp5ZdVVESLDKNR2Vdm2XZVdmDx5TSU4HVj ljvFcU/mYVFVJzCg+6tYLN43h/jjx+MVv8jk2iGhFEpnS04wvy2FagmFNXhN+SNNUSRK PvbIXJwjTSQjpESf6E6rUwmoEnrxU7P7kXs0exfwt8TdAZjO8y1kGLALRS8bQDLPpugK Yr5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EfCLMjBf; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2si18625284pfb.85.2019.05.06.22.50.56; Mon, 06 May 2019 22:51:20 -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=@kernel.org header.s=default header.b=EfCLMjBf; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729133AbfEGFkh (ORCPT + 99 others); Tue, 7 May 2019 01:40:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:59986 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728313AbfEGFk3 (ORCPT ); Tue, 7 May 2019 01:40:29 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F12FB20675; Tue, 7 May 2019 05:40:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557207628; bh=VRtGhhfvENSk8MY3OOpOVHVA92UpWAu95L5vA/T4aGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EfCLMjBfimSrl+6hRlsICl8+sTs8uGacnlQdSRvhKdM+kULeMJPYCeSKk9B/mrneO 58eD0ZUs6jH6A1HILb2cd0797yM9+lNvWmyQzGmdMusVQSMUtD2TcxREZWKy2WgWVB fwbeSCFremyK7eijYM+Y4RbYeOLLhoocs8CAcMA0= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jerome Brunet , Jacek Anaszewski , Sasha Levin , linux-leds@vger.kernel.org Subject: [PATCH AUTOSEL 4.14 66/95] leds: pwm: silently error out on EPROBE_DEFER Date: Tue, 7 May 2019 01:37:55 -0400 Message-Id: <20190507053826.31622-66-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190507053826.31622-1-sashal@kernel.org> References: <20190507053826.31622-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jerome Brunet [ Upstream commit 9aec30371fb095a0c9415f3f0146ae269c3713d8 ] When probing, if we fail to get the pwm due to probe deferal, we shouldn't print an error message. Just be silent in this case. Signed-off-by: Jerome Brunet Signed-off-by: Jacek Anaszewski Signed-off-by: Sasha Levin --- drivers/leds/leds-pwm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c index 8d456dc6c5bf..83f9bbe57e02 100644 --- a/drivers/leds/leds-pwm.c +++ b/drivers/leds/leds-pwm.c @@ -101,8 +101,9 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv, led_data->pwm = devm_pwm_get(dev, led->name); if (IS_ERR(led_data->pwm)) { ret = PTR_ERR(led_data->pwm); - dev_err(dev, "unable to request PWM for %s: %d\n", - led->name, ret); + if (ret != -EPROBE_DEFER) + dev_err(dev, "unable to request PWM for %s: %d\n", + led->name, ret); return ret; } -- 2.20.1