Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp682588pxa; Thu, 27 Aug 2020 12:51:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwu0pgWRObMZhrNPkV87JNsR/FyAmRfIqzMbZrnfuTad9fkuk4uiEdOW5JzzwwCwGS2s+ce X-Received: by 2002:aa7:d596:: with SMTP id r22mr21763769edq.204.1598557879296; Thu, 27 Aug 2020 12:51:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598557879; cv=none; d=google.com; s=arc-20160816; b=nssgFmtqULXXnPBKNnwfFHklmkzmTIfDqyPdF4T3TafuLn+FkguBbMk3arzglmGWNv 6i4/RXSqY8oUrt2VTzCK4S8jTFo6QPcwGPuU6jtTaXayY2jehQeKbgTct199zpM0GEm+ LJaY+JTjIaPCADxeHOBuxdAxBVTnfOQx4QP/tKVJjOW9vNguEAEJzg9tEQsOSx0YjVrq oMi9OiICoU9veRJGW3E0UdU6K64K6ZgFVXAflpIYJYEGnMU4/TOWm8E622oBzqbIFguY gUImV3mu+/2Og9PYv68AtSa4XuhtEU6kBrH8rDt9AZJIkh+aC35Ji+wOVtsOhl50AZL2 Y3Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=J3gzyzO1gbxLdidSqR6d1wlDjGQFBUJvUcq8FiJnVtg=; b=OBap6W8rnBMUSdr+GS2+Wpy191O47PLHsyzXJh9ztD93G016o7l0n9wEqPKhhOKFTp KME4oQesSkRvVqocYkBnivd+5BfQyZIUhaU1WiTBSNr1mvkJuXjzbZUtsrHGC7riAuKl BnU/QUBOfVphwHUxwfPaXSkF+LiApEsXn14+kaAgvmUo4lUP5gmfe+WtToHJg+POOhEu zzkX1eHD3e/6a9/hR4aXyu/OsfY/k2/frUkEGJbPnVXCbW4oPWcrajBi1VXEQ05a4GRM a4ggYcW/ul1J3eGVwKWNrFC4EWp8mAA+PQ/2vCRXaQgfk8BgOD9lOvbFDZ205pbj2bwN Aq1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ix3Va+o+; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i8si2344890edj.113.2020.08.27.12.50.56; Thu, 27 Aug 2020 12:51:19 -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=@gmail.com header.s=20161025 header.b=Ix3Va+o+; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727112AbgH0Ttr (ORCPT + 99 others); Thu, 27 Aug 2020 15:49:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728046AbgH0Ttm (ORCPT ); Thu, 27 Aug 2020 15:49:42 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9916DC061264; Thu, 27 Aug 2020 12:49:42 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id d22so4315900pfn.5; Thu, 27 Aug 2020 12:49:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=J3gzyzO1gbxLdidSqR6d1wlDjGQFBUJvUcq8FiJnVtg=; b=Ix3Va+o+3XbmB70WBqBC725rnsHUyDm6ZoPZy2b6hcZ+38QrgQbROqTVcHhuzh8SXK rMQANp0HWGAK0S3jGGDuzX8pV7jIMANFnK9ew4PiVoz4gml/9QsbVZBlaad6zaN1zTHh L56Wy4g5LQD9tNdVMaYcFb7N6DSCrhozT7oT7ICoIwsrJXoKJ35rzoD+7dpGgpwdSemG QSZ1F8DLFO0OU5j/xtnuxVyj9N16sMJ07M9DSs8l6Ckbjdjz+9xWDA08Xegmz7/mZkJG XlgePyfePvWDzYQBw5KQxNn3PpFfJTT0e70LTT9XoS7BmcRJcAJrKFseBYXuCfY+VAcz tHeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=J3gzyzO1gbxLdidSqR6d1wlDjGQFBUJvUcq8FiJnVtg=; b=KQMt2UWmN/7qvR49jOj55L8Aeudj0TQlLTpQhAlb2XBVx/MgeZUKlWD9vn5rpWHl+6 bBWVxwmZpJV3RmQ2wNIEOrXwpWSgEzdPfFo/IQgCSWzf2MhA+vzVpN4IWU/8lIN30tX+ lTEGw3qUtqL33YhBOVGHbm7Bl3/gwI3YbyZaE9BgUNCUSMHaa/2byQFOzjWWC05ekrA/ 3ypZKA2GRVNXpBsAFM9Ymmjr+l6BuxvujDHcOtuJlRgDj040aYYIVSefy2c/FhY6ZpvG jwxm3oVW+5vTkGy5kNbhuUa/EkZ9K+44EvxTKSU2XKjjb145Q1UyWc+ErncL/Jx5QTtl 48sg== X-Gm-Message-State: AOAM530AnCyKokKO6Y3I762fcf/SWao20PKoqsIiAcF6G0S9lupMS0hn SOvRnFnD9p4b7QMoXcpvdjs2DVPIffKg/QkgJiU= X-Received: by 2002:a17:902:8208:: with SMTP id x8mr6288066pln.65.1598557780819; Thu, 27 Aug 2020 12:49:40 -0700 (PDT) MIME-Version: 1.0 References: <20200827192642.1725-1-krzk@kernel.org> <20200827192642.1725-7-krzk@kernel.org> In-Reply-To: <20200827192642.1725-7-krzk@kernel.org> From: Andy Shevchenko Date: Thu, 27 Aug 2020 22:49:24 +0300 Message-ID: Subject: Re: [PATCH v2 07/18] iio: adc: rcar-gyroadc: Simplify with dev_err_probe() To: Krzysztof Kozlowski Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Peter Rosin , Kukjin Kim , Michael Hennerich , Kevin Hilman , Neil Armstrong , Jerome Brunet , Martin Blumenstingl , Marek Vasut , Maxime Coquelin , Alexandre Torgue , Beniamin Bia , Tomasz Duszynski , Linus Walleij , linux-iio , Linux Kernel Mailing List , linux-arm Mailing List , linux-samsung-soc@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 27, 2020 at 10:28 PM Krzysztof Kozlowski wrote: > > Common pattern of handling deferred probe can be simplified with > dev_err_probe(). Less code and also it prints the error value. Reviewed-by: Andy Shevchenko > Signed-off-by: Krzysztof Kozlowski > > --- > > Changes since v1: > 1. Wrap dev_err_probe() lines at 100 character > --- > drivers/iio/adc/rcar-gyroadc.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/iio/adc/rcar-gyroadc.c b/drivers/iio/adc/rcar-gyroadc.c > index d2c1419e72a0..e1a7c93fc2db 100644 > --- a/drivers/iio/adc/rcar-gyroadc.c > +++ b/drivers/iio/adc/rcar-gyroadc.c > @@ -495,12 +495,8 @@ static int rcar_gyroadc_probe(struct platform_device *pdev) > return PTR_ERR(priv->regs); > > priv->clk = devm_clk_get(dev, "fck"); > - if (IS_ERR(priv->clk)) { > - ret = PTR_ERR(priv->clk); > - if (ret != -EPROBE_DEFER) > - dev_err(dev, "Failed to get IF clock (ret=%i)\n", ret); > - return ret; > - } > + if (IS_ERR(priv->clk)) > + return dev_err_probe(dev, PTR_ERR(priv->clk), "Failed to get IF clock\n"); > > ret = rcar_gyroadc_parse_subdevs(indio_dev); > if (ret) > -- > 2.17.1 > -- With Best Regards, Andy Shevchenko