Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3052709pxk; Mon, 7 Sep 2020 01:31:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxccbuwVCOlHr7PGVIlUu/0DFBt7pIBV6XxFkRrr7Zo6f7rJG7QpkMr5l+YeeTt9l7HX5Ao X-Received: by 2002:a17:906:a4b:: with SMTP id x11mr9153174ejf.368.1599467509894; Mon, 07 Sep 2020 01:31:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599467509; cv=none; d=google.com; s=arc-20160816; b=h43cJE1wm8/mHhahZDS+6Wng81LTeXfsv64tIhQocMyz8Rc4QozIu6CJPLTUTlop/C qnmdz+iQN8+oOQi7IdkEM0zuCimEB/Q/p6AUUi7p//FOTHIIU98tgE3amBN2MXpKCHAt Xq4LPiCqUll8dGgVWH28F48ZHz9DTjsksxJ4roqpGnTBNttK9oZ1ztJHO3uVyPX43vWH kZOgu2ZT1s5FC7m9tyJXikZA74cbfcJpQsEiJQMldQhE1o2Rt3ED/0DsRjAwLEcUjLgA TZ6Z1GC/xvSInxbTTQzlJjJpxu9R5e5Zi8+btDZcUG9J6p8KVud1x8f7ZWpd8lwfE8GS jn6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:to:from:user-agent:references:dkim-signature; bh=nxwjXtCfzhbJphkRoaZPGRX8lSLuG3IRQbDMiVfMlTw=; b=VDMgy95uMJqRsH7/Skj9R5gtfdfYlElG0FQl1+vU6a8ta3ZglXZLHV8O61YYw0dZkb 0poXtK5ch74HOuD9rFmnS8DIb4g7De2+e0MORRt3TOWqPTzzvxhQhoCj08sXV8RYApjp ePnySW6hJO5DW6E/yLA3AL4JuKTZ86YV9B/I415sNcnnT2Z8Po9gMCaNxE1q+km2AhQy PuCH/x3KnXmiEoIrbZ8Ot96Gs7e1JyGzB0S3v56Z8D5qJ9yM0x5K9QzNfVF734N0MV9J F718miJla1WuBOpJu0TVdpQiLtgBVVtwTmTeVQyHi/I7HqhwPoFv45SdfhdmfNEEWRZK Hv/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="hDYe3/X1"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si4369835ejz.158.2020.09.07.01.31.27; Mon, 07 Sep 2020 01:31:49 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="hDYe3/X1"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726978AbgIGIas (ORCPT + 99 others); Mon, 7 Sep 2020 04:30:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726971AbgIGIaq (ORCPT ); Mon, 7 Sep 2020 04:30:46 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAB56C061574 for ; Mon, 7 Sep 2020 01:30:44 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id x14so14790563wrl.12 for ; Mon, 07 Sep 2020 01:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=references:user-agent:from:to:subject:in-reply-to:date:message-id :mime-version; bh=nxwjXtCfzhbJphkRoaZPGRX8lSLuG3IRQbDMiVfMlTw=; b=hDYe3/X1Fp/nkA8cq5LKQEuabNxEiXDOUvZ6woI5zrDtV/o7pIJt3+dMMm+9HY2TUp cJLd1Ak+4UWRcYyvT80mTkYj6NBmFbmk6wB+qnPxWUc1KaSG9Qn2t56LtE+VGh2qiVzv 9JuYo9Vx8HM3XBkFaq+ij9ZViBAHur8hlIbyrkyKrJ7qClw66Dqhb2jwIu0SC9QJzrdf gUGdUHALqoOY+mnDt2IsTPU1QvekYjKaGug1Vdp44Er/RQqCawCgaUylXU1NoaEZKpVP zru4e1SdyZCGOVqvjSWFeF95bi3nh2JfDYBl6ExDbqti5ZIjKFPpjuuV0LG1Bi9HubrM sD+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject :in-reply-to:date:message-id:mime-version; bh=nxwjXtCfzhbJphkRoaZPGRX8lSLuG3IRQbDMiVfMlTw=; b=YmfUERXMpaoIxmfmFC4dz1pM+voMaTRRNbzSnxCF0k+92uhsTigqS0+hhKkELsu/Pe LS84pYqxEkzfR9WWB1O/mkC8AEBV8REM2gUspviDdI5X0p94RwlhMQmKCCZkPazWWWbZ RNUCEICmDtJ55GwWMJOkB/DXRQ5dGjP0eLMYA54iGlREz7IVwo2B4g1w5Z1P7wX1cxfb fPgjnp+LlOFwQW3lVfpzmogUM9dNftIcUIjywM8a4+CIkJD6NZakhEHZoun/futCGld2 MR8+1cjKUazMoQVuFDLxuirGFvzXmHbI90s7JumwGJO/uqYuMMyRCSlENg/7t5xFFM1f SkwA== X-Gm-Message-State: AOAM5331KlwO3aB2tChwGHKqcV+O84s5Bj+hddbG52hRBw8Za0haPjxs 5FQsLUncLfnF48zCNAypsieAIQ== X-Received: by 2002:a5d:4591:: with SMTP id p17mr20049982wrq.408.1599467443488; Mon, 07 Sep 2020 01:30:43 -0700 (PDT) Received: from localhost (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id q18sm27461214wre.78.2020.09.07.01.30.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Sep 2020 01:30:42 -0700 (PDT) References: <20200902150348.14465-1-krzk@kernel.org> <20200902150348.14465-7-krzk@kernel.org> User-agent: mu4e 1.3.3; emacs 26.3 From: Jerome Brunet To: Krzysztof Kozlowski , Michael Turquette , Stephen Boyd , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , David Lechner , Sekhar Nori , Santosh Shilimkar , Neil Armstrong , 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 Subject: Re: [PATCH 07/10] clk: meson: Simplify with dev_err_probe() In-reply-to: <20200902150348.14465-7-krzk@kernel.org> Date: Mon, 07 Sep 2020 10:30:42 +0200 Message-ID: <1jsgbuaszx.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 02 Sep 2020 at 17:03, Krzysztof Kozlowski wrote: > 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 Acked-by: Jerome Brunet > --- > 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) {