Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp532120pxk; Wed, 2 Sep 2020 08:08:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZacVlx3tTuEJSMNE19M6dsEE9etqd/iaHSSQEVXqQujvmHqQ+4yQn3zBjwwwGkYJTlmmD X-Received: by 2002:a17:906:85c1:: with SMTP id i1mr428427ejy.97.1599059281194; Wed, 02 Sep 2020 08:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599059281; cv=none; d=google.com; s=arc-20160816; b=ZN6E+UUhMchoIwQ578j61x/hP2a++Mu09MIp8Q2zUKnzXELQYsH7c09g6id941czzC 5qXPJ9XpUEdVlgcNJpyVYCssfRn/AxVqxETl0olGkBUN6rgKkeOg1vEPZTcIsjeLZcWK Awav56Re/kmaLXJbRsZiXS4QaYvovc9YWaCkYzCUsfmyiPizZF+eyBjbAwXVmZITP79f RE64oidTdnI9MHB2lLIETIZuchdYrrm2los+eNmsRDw+6SxIhrjt1EGnzuNuvGi7fMo/ xknWxNSe1OPfAlPtpimpr3jCprcRiKoIffYkARJgIG9yzKJ++wWM/eSr8en1BILMFPV1 RVzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=pDCthrykMbhWNvtkcOg+SBzD4k5hld4XOa5NP+q1zXQ=; b=WVRvfXwHHqHywTif7Vc02cknMsQk3GG1LrF5Uc02vgtfyeY7ei9SJ637uIVI6tH0F8 W6knqArySM/DZqJTVSwEL1V0WS9zj/TGO1KssDkmKZX2RRLQt+qMnYmA8oHYkXLUi6v/ lfe2nwXlzaQpugmlcstp1t7dByo+9zLHbVanhNVI6iC4fkfyLdi92r2qcFvz+2yQeIDi cdiC/PQII7NtA+N8afL2kF4K8WtyihXsJY7aZafAB5vElUfsrLBWK2QLb1dJVHAKHdCB A4jGSxxc+TlAu11XJ8Jrjx38uEehgmJeYI9ImhQV2x7iGjHwa9u+D2wgphX3HLUfePv1 hVgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nQQX60L2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id l18si2763770ejr.492.2020.09.02.08.07.37; Wed, 02 Sep 2020 08:08:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nQQX60L2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727991AbgIBPEs (ORCPT + 99 others); Wed, 2 Sep 2020 11:04:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:41818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727818AbgIBPEa (ORCPT ); Wed, 2 Sep 2020 11:04:30 -0400 Received: from kozik-lap.mshome.net (unknown [194.230.155.106]) (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 9C637214F1; Wed, 2 Sep 2020 15:04:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599059069; bh=FNfm1tmiP1SHAfynJEL7ATFOXsx4dnDu44NKhojfEPA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nQQX60L2h/dw5HVupUkQlD1zgBiZVmY6Sewdlbk4yzSvBYGknX6upVlBsPtmbqrRZ jYdpNiDqbblahHoEMcAbKX1i+FaDn89u0TwxJUpqxr9gmf0BrxEqDntza3h6uxJtpX xImEZhMVLadjoDGFhceFvcH+ssVbmoKBO7PFUxuU= From: Krzysztof Kozlowski To: Michael Turquette , Stephen Boyd , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , David Lechner , Sekhar Nori , Santosh Shilimkar , Neil Armstrong , Jerome Brunet , Kevin Hilman , Martin Blumenstingl , Andy Gross , Bjorn Andersson , Maxime Ripard , Chen-Yu Tsai , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 07/10] clk: meson: Simplify with dev_err_probe() Date: Wed, 2 Sep 2020 17:03:45 +0200 Message-Id: <20200902150348.14465-7-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200902150348.14465-1-krzk@kernel.org> References: <20200902150348.14465-1-krzk@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- drivers/clk/meson/axg-audio.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/clk/meson/axg-audio.c b/drivers/clk/meson/axg-audio.c index 53715e36326c..dc22b0c45743 100644 --- a/drivers/clk/meson/axg-audio.c +++ b/drivers/clk/meson/axg-audio.c @@ -1509,12 +1509,8 @@ static int devm_clk_get_enable(struct device *dev, char *id) int ret; clk = devm_clk_get(dev, id); - if (IS_ERR(clk)) { - ret = PTR_ERR(clk); - if (ret != -EPROBE_DEFER) - dev_err(dev, "failed to get %s", id); - return ret; - } + if (IS_ERR(clk)) + return dev_err_probe(dev, PTR_ERR(clk), "failed to get %s", id); ret = clk_prepare_enable(clk); if (ret) { -- 2.17.1