From patchwork Fri Feb 21 00:58:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 11395197 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C0C0D13A4 for ; Fri, 21 Feb 2020 00:58:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 928A6208CD for ; Fri, 21 Feb 2020 00:58:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=crapouillou.net header.i=@crapouillou.net header.b="jCUJOUi1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729439AbgBUA63 (ORCPT ); Thu, 20 Feb 2020 19:58:29 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:40906 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729419AbgBUA63 (ORCPT ); Thu, 20 Feb 2020 19:58:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1582246707; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=hNL2y+v5S7yvFXD6Rd5po+APK5tuBqigpYaXtPqV024=; b=jCUJOUi1gluCYom/AohDJtxmfoHUs4bc/3sNRCuZM+k8k5ZgldreudXZVS/NRDW5Eqp1Tm 9EAZyZijg3TEISAQHsTq/7LrQqkADmC/wvbjV2C5BbFbWxIE7lDkvbVRbiUdd3w9jTgrKr sgWOM/jKG2qHiEP5XgCYIx0y7jI3jlo= From: Paul Cercueil To: Sebastian Reichel Cc: od@zcrc.me, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH] power/supply: ingenic-battery: Don't print error on -EPROBE_DEFER Date: Thu, 20 Feb 2020 21:58:12 -0300 Message-Id: <20200221005812.271187-1-paul@crapouillou.net> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Don't print an error message if devm_power_supply_register() returns -EPROBE_DEFER, since the driver will simply re-probe later. Signed-off-by: Paul Cercueil Acked-by: Artur Rojek --- drivers/power/supply/ingenic-battery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/power/supply/ingenic-battery.c b/drivers/power/supply/ingenic-battery.c index 2748715c4c75..dd3d93dfe3eb 100644 --- a/drivers/power/supply/ingenic-battery.c +++ b/drivers/power/supply/ingenic-battery.c @@ -148,7 +148,8 @@ static int ingenic_battery_probe(struct platform_device *pdev) bat->battery = devm_power_supply_register(dev, desc, &psy_cfg); if (IS_ERR(bat->battery)) { - dev_err(dev, "Unable to register battery\n"); + if (PTR_ERR(bat->battery) != -EPROBE_DEFER) + dev_err(dev, "Unable to register battery\n"); return PTR_ERR(bat->battery); }