From patchwork Wed Sep 2 15:03:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11751001 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 16AF614E5 for ; Wed, 2 Sep 2020 15:36:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 00708208B3 for ; Wed, 2 Sep 2020 15:36:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599061014; bh=CvZl/N6bMSMI88HBcyd5T1/2bkJNYPalt1VI58vbW94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=CLmBCzGBWSAS7I298KsJnRPczhTM2Fk8AN4GOf1U2Z600urKUhX+IRRBKKGr0mcz9 nCFUvMJz0EWAp0JhpD/rBo/NHehHmWhnUDLRZR3qCSQDeg4hWXQZIX27bYHeMC59jN eqMlShEJagWHlwBONwJrdApSudMwNhLw8NkxwzXo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728180AbgIBPge (ORCPT ); Wed, 2 Sep 2020 11:36:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:41506 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726979AbgIBPEK (ORCPT ); Wed, 2 Sep 2020 11:04:10 -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 8107C2137B; Wed, 2 Sep 2020 15:04:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599059050; bh=CvZl/N6bMSMI88HBcyd5T1/2bkJNYPalt1VI58vbW94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BSlvK2dLedkxybPvtTPtPYsetOZIwJjk6zGqLrgUjsKzoJwBX+Y974vrDZgNMf/fL og7ZFTaWpdhrgmsKOXlFhO/TU60eSw5LmOWZKRSFc2gwf/1hs7jxhcXiDphxEv4doI IzaCIiKljgWKe0HsH/hGjN5xRV/AWfFWQtqjOUPo= 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 03/10] clk: bulk: Simplify with dev_err_probe() Date: Wed, 2 Sep 2020 17:03:41 +0200 Message-Id: <20200902150348.14465-3-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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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/clk-bulk.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-bulk.c b/drivers/clk/clk-bulk.c index e9e16425c739..15978d2a1233 100644 --- a/drivers/clk/clk-bulk.c +++ b/drivers/clk/clk-bulk.c @@ -96,9 +96,8 @@ static int __clk_bulk_get(struct device *dev, int num_clks, if (ret == -ENOENT && optional) continue; - if (ret != -EPROBE_DEFER) - dev_err(dev, "Failed to get clk '%s': %d\n", - clks[i].id, ret); + dev_err_probe(dev, ret, "Failed to get clk '%s'\n", + clks[i].id); goto err; } }