Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2946203ybf; Mon, 2 Mar 2020 19:21:08 -0800 (PST) X-Google-Smtp-Source: ADFU+vt7ECaZFTtlBF8z+p6M8MJG8jUKeFSZoso3lEb7Vq3+iENW7/smG6j2eRAwMowMH4ynuaNk X-Received: by 2002:aca:814:: with SMTP id 20mr1095370oii.159.1583205668367; Mon, 02 Mar 2020 19:21:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583205668; cv=none; d=google.com; s=arc-20160816; b=Z9breGXANT56wcQF/Pv5bj7iAyzlCfeLy7oCoFLrz1Uk8JwcK2nSi8uYCGLZ8D1QP9 vud6I+Ah1Fb4yGGXB+zv1Nz+E+TY6lfINd40R11lQZQzHRWcNaf35mTDLX5nYS+xgaUS K3vzH90LLyARi7cj7UYYSZ4B4kC1ReG/IuERxHpaW2TPbdO0Yx1x7O1nd9qAqzIBwBfv x/ar4qRzcf+ploxhkAqg8Ma9f1eAl8xrCNmnB8R0YPQrC+JhlVnOM8k74zBusTwttcyY NL6lhoyTsx5IomFXc8Sw/o6u3ktrr0OrhoSgItquI2EtcSI3u8SwM+N4StQQNCxSO6nI yVYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=KTe7fPRG93wG5UYOROfWR5OrBYtNwOx/UiDZ6oZHhLs=; b=Jn5bv2IILo0oxAE6cqZ4/fraKlOLVrY8ovRKxepZeSm23iv96RF5YQlfgVvT5uIKSI 1/zT/S9eHY+eMA2/4L3mQ2BSrXj87LYLLFdZEMVud36jXQfgC5zW6+p1y2MrB/8TPByi Q+4zmKjH3st8nahKmxDuMnKVvdyWf38O77PD1j2CtlsftV0U71sMnF++K6d6GKIujHcB JUsq5yyt9oKDBHNze1EJWQgWvvdGP03CzkLWoJ5ULB756cdNt2f4okVRO6XvLd8AcGF9 B/wYrOwUP3F5CRiT9ePksK98D7q5IQrbbdjmuwQ2Vc196p1G4mWJsg3javcI55UpH6g7 zwhg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t12si781231otr.199.2020.03.02.19.20.55; Mon, 02 Mar 2020 19:21:08 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727041AbgCCDU1 (ORCPT + 99 others); Mon, 2 Mar 2020 22:20:27 -0500 Received: from inva021.nxp.com ([92.121.34.21]:45676 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726946AbgCCDU0 (ORCPT ); Mon, 2 Mar 2020 22:20:26 -0500 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id E24B3201232; Tue, 3 Mar 2020 04:20:24 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6217C201236; Tue, 3 Mar 2020 04:20:22 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id D4DFF402F3; Tue, 3 Mar 2020 11:20:18 +0800 (SGT) From: Anson Huang To: lgirdwood@gmail.com, broonie@kernel.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] regulator: anatop: Drop error message for -EPROBE_DEFER Date: Tue, 3 Mar 2020 11:14:21 +0800 Message-Id: <1583205261-1994-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org devm_regulator_register() could return -EPROBE_DEFER when trying to get init data and NOT all resources are available at that time, for this case, error message should NOT be present, the driver will call probe again later, so drop error message for -EPROBE_DEFER. Signed-off-by: Anson Huang --- drivers/regulator/anatop-regulator.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c index 754739d..41470a8 100644 --- a/drivers/regulator/anatop-regulator.c +++ b/drivers/regulator/anatop-regulator.c @@ -305,9 +305,10 @@ static int anatop_regulator_probe(struct platform_device *pdev) /* register regulator */ rdev = devm_regulator_register(dev, rdesc, &config); if (IS_ERR(rdev)) { - dev_err(dev, "failed to register %s\n", - rdesc->name); - return PTR_ERR(rdev); + ret = PTR_ERR(rdev); + if (ret != -EPROBE_DEFER) + dev_err(dev, "failed to register %s\n", rdesc->name); + return ret; } platform_set_drvdata(pdev, rdev); -- 2.7.4