Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp680843pxa; Thu, 27 Aug 2020 12:48:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw90a6L95XaePy2KkWipY0md9VPTyDuQwSFXsaz15Ir6vXf/UJKeO4YP0P2FA+NGreVGqbI X-Received: by 2002:a17:906:b2d7:: with SMTP id cf23mr22256997ejb.113.1598557710526; Thu, 27 Aug 2020 12:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598557710; cv=none; d=google.com; s=arc-20160816; b=eEF/I03nnbI/xf+UJK4ssl1TBkz7d6vqL5jKrwT4081dSwAZRSnUIH/G4UcFX3+ouj A94/3ZwVysnY4gRshgW0Sxq5rk2cEAwINafBNL/Cv50GZtS1kcXLfyFgquToy1V7ACcb QeHSNgiO6/oGBtu03i8QszxUyaYwtdKqa+0v0BQbsC062jZUBZev6+FipDZrdhZ5lhAl UAx8N+WcNISPfTA9LBKcneO+alD5RIDz9R7WvO3OBTyQRWAWfL9tkc/BzqCBPOwyKxoD ouyiSwZZd46Xujj61eOxORVeuHrwbj0ZQgutQMie/EPGYxh78LwxDNWT2rqzyWYPJbF/ 00ZQ== 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=rF/IVgk4h5+MJuABqXa02sDX7QSYWX1qauCg5n/+jTM=; b=NOjmi8RDngsW15YrmaQfXcI1OJix78SSPBgoPdkZfj3PbGOL7oLNLW+JFnVyPEVu9E GrMdMsuwlHZllEhKXqPcS5AibmzPuqwceUFzAbG7oH3QU7gDv+EvaJzhpJ9eGBhi28R7 pZBm0r6+9upXrTWGjtrJxxXDwb0N0rP5Xe+9o3X9OT5PullsbMJRGvG4lN55Ct+GfMOf diNW7EQfH41LXv6jKZW8U8hsIQ8EDXsZ7okgTG5CkuqcX3m+SnjvoFgbRSiwG6KlUefw umaF1gCgKiNBslj4PKcfq/Vn7yAqpSfD99d6tWbxIa83FIQThDkWOGFGaa8Ubs4LaFCK S+Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TV1dA5Xo; 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 d22si1222534edz.234.2020.08.27.12.48.07; Thu, 27 Aug 2020 12:48:30 -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=TV1dA5Xo; 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 S1727813AbgH0TrM (ORCPT + 99 others); Thu, 27 Aug 2020 15:47:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726147AbgH0TrK (ORCPT ); Thu, 27 Aug 2020 15:47:10 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CACDC061264; Thu, 27 Aug 2020 12:46:54 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id kx11so3139590pjb.5; Thu, 27 Aug 2020 12:46:54 -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=rF/IVgk4h5+MJuABqXa02sDX7QSYWX1qauCg5n/+jTM=; b=TV1dA5Xov0ck9OozRII/ftao8/R/YHMTCO/1WHAIME1O4niFg+OgXtzAY2zjfXEpz3 e0y6JKc4ubTRQp2/5w0foJUYIoIiuNW4CZ8lovjPOZqrdFroT5QwHYWrBp5yjg1/iO4K SVI5qRKlgZYwcEEDVM5YA0sI7csZKPJ2go+y1RjxW6Y47BgMpwAgSmA1F/niu3rX4LJI Luhg6tmGDAO8T0kxLUogjDa7/r9vrR6E9YDb+FNA7Bgv3VY5XQqe3DghJZnJPELSU4YQ Y2d132gTzXLclulfMER6/ZCCJ+q1KmVWZnuoZuPJmXNmjdAxfrHlY0Y88zQ4nI6ZZMT9 9/Rw== 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=rF/IVgk4h5+MJuABqXa02sDX7QSYWX1qauCg5n/+jTM=; b=EKHn0QuDgQprWoeSAgJQfEjPdf5GDy8/FgeDgbk4SVlYY6Oq9Jlfp6ryQ8GFDytCrm Yyo6G96zrurPgoWgXoys1YdErLmeYGDZhrRqYfOV0SyTDsmuMV4L/TzK0Iz+3YoCndJZ fZzkt6jvYcZcotgvQXShu6zzwAaYCmT4zyscEK8QQostEj57CtSoQygIyY8Vfy1T2tXo BAWEV/yWR6j63yGMiQuUiRUR6z6nVTSAKCh4Rxz4m82ad5d1DDVyfRvxLV7o69NBzGFh 1iqvO4NBweL0y/OAvBrqplq4YjZ/DQTcLrhMpN5B1Kfg6BZGW7xhwAiL7YnGfBL65D5Q Re5A== X-Gm-Message-State: AOAM532jIs5hrINpxiOJQAyj4FLzGGoOvj++Hqp4LL3iv2TwCkDITYXw UmNEaJOBbTv4CglDqmzf9gz+Cba8L1Rjaj/Tuh8= X-Received: by 2002:a17:90b:509:: with SMTP id r9mr410422pjz.228.1598557614008; Thu, 27 Aug 2020 12:46:54 -0700 (PDT) MIME-Version: 1.0 References: <20200827192642.1725-1-krzk@kernel.org> <20200827192642.1725-4-krzk@kernel.org> In-Reply-To: <20200827192642.1725-4-krzk@kernel.org> From: Andy Shevchenko Date: Thu, 27 Aug 2020 22:46:37 +0300 Message-ID: Subject: Re: [PATCH v2 04/18] iio: adc: exynos_adc: 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:27 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/exynos_adc.c | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) > > diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c > index 7d23b6c33284..40585a96c848 100644 > --- a/drivers/iio/adc/exynos_adc.c > +++ b/drivers/iio/adc/exynos_adc.c > @@ -844,13 +844,8 @@ static int exynos_adc_probe(struct platform_device *pdev) > } > > info->vdd = devm_regulator_get(&pdev->dev, "vdd"); > - if (IS_ERR(info->vdd)) { > - if (PTR_ERR(info->vdd) != -EPROBE_DEFER) > - dev_err(&pdev->dev, > - "failed getting regulator, err = %ld\n", > - PTR_ERR(info->vdd)); > - return PTR_ERR(info->vdd); > - } > + if (IS_ERR(info->vdd)) > + return dev_err_probe(&pdev->dev, PTR_ERR(info->vdd), "failed getting regulator"); > > ret = regulator_enable(info->vdd); > if (ret) > -- > 2.17.1 > -- With Best Regards, Andy Shevchenko