Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp689859pxa; Thu, 27 Aug 2020 13:03:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzm4T9qL7bHiRADxTOr/No95RGejV3B2XSs6lWCthy9K8H2SYiTZL8clnAFKs1mIKl11GmS X-Received: by 2002:a17:906:5418:: with SMTP id q24mr21459813ejo.296.1598558632204; Thu, 27 Aug 2020 13:03:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598558632; cv=none; d=google.com; s=arc-20160816; b=jLaeHNiE83Agct+PJwpkZuekNE0B3OJlWd8wIFJY7HiYM7oNQtZDpQugBqjovm9qut YmjNwxdp39d923QPnQAfPbtEJC/I4txPEFv8E8vY78niK+eR2kZmVmbXGnWZ3Eq9YAVC ABvYZNfsV6k9QNPJmbsi3a7FOz7B30zlrltak4olupibcGt3UP/L7MKffwOLUBAMvEbG +mKESehp/artx9jEdfYNUifYULfLFAeUJ6xoofFn3o04Wk3bkx1mpP87uKuUmY9fzrBt 3uaRZ9pfSzoJV3P/Oea5uyphpKmJW3ru6CTvkcMELPcetg7qalIQx+ky9+fk9BuBxyYk 0IvA== 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=jZGo/LXMWA743P+olH7TRkE+L3lrjbqKbRZ3LxAQjPo=; b=fWEgddzb8S9NIQzNZNlMapFXp1UtrE6gR4bRNJt7lg3v4r0HN6+N7ZCSurGtcrS2HK /oWvM0dbmrtt1Coj0kDKgHpGTiqeq+4Ez6+v9sgRVfROWUYfTgkb06sAqq+P3EHNe5ds DFPWcdKuLGZjS3NXi0L3HcuMqELry2VMm4WYPiyzY6R/pjXxdzYQtRa7X/3baTscKecm XYHWDst3BQvyWE70mK/Tjr3KsHBa07q5Y817QnnIOb9EmaeSkvkgNeBcE+6QUHcFkqYU sp433agzbAjMUwBPZ8RdeVsU7WRHUluFCbQnbQeff3ciH4hzUiRyKlMtEjQdK3fTwq19 Berg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dTu6o2U3; 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 fi14si1982354ejb.628.2020.08.27.13.03.28; Thu, 27 Aug 2020 13:03:52 -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=dTu6o2U3; 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 S1726845AbgH0UC0 (ORCPT + 99 others); Thu, 27 Aug 2020 16:02:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726120AbgH0UCZ (ORCPT ); Thu, 27 Aug 2020 16:02:25 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6CDEC061264; Thu, 27 Aug 2020 13:02:25 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id 17so4331181pfw.9; Thu, 27 Aug 2020 13:02:25 -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=jZGo/LXMWA743P+olH7TRkE+L3lrjbqKbRZ3LxAQjPo=; b=dTu6o2U3wIn+j1v+r3MXNSN35FUN+T2Ga+C6IEZhOqyDDBfBE3A597INaQykc/zK5N e29lSW8oIy3von1EDSHzrXAVeRMAvW1ed+lYOELqagYL5sR2inJeqwfBbqXV4FK6sCMk Hfm42l4h/LTOWilsOGK7JOMAPAdmKuTI7ri15EU81fGomSsgujOEykmO3j5u3b8d00JT y6G7L3ZjYiblAjxovxtPZnHCI16Md4+vLhzEs1tK7lNien1ry4pAHrXAiN3tLj6C5xlc yK8rJWblvVYrsonzu63yJ/EgonbAcYBoDqsF2KrONQ8csAQTA+38zWBBwcTvD1DPUifV GLSg== 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=jZGo/LXMWA743P+olH7TRkE+L3lrjbqKbRZ3LxAQjPo=; b=mS4xUPJAIs6/fgjpcWp1vmIfjkQyihn4P+Y7q2SRTA6rmUh37dVoBgGjG+zLH98zXG 5oRefqZBb003vDawErEhRVmO7eWcUL6jnV/4PobB2zvQyOgZBYsaw/jlnTw9YWjjJggv nqGt2+LuM9K1GN+FoMNhGI5fhPa6KgJo8sp2aNPFLX0RTRfuyU2e8i8hTCOBRDG57nYv xmY8rJfSMzJEaEHAnPZ255/+COmlkeCixqby9TtAirZM+sPhSCq9XOXRJJyppk+w/rSK qJ0Ji0cQCZ7q27NQRbcpP5M8S9suLBFgpmJbTzcpFy8sV1ksiAfGvkSOG1d6YveXHE/M +K/Q== X-Gm-Message-State: AOAM531aelGRC0R/4qKJpP5AacIF90RkXKZ9EykLBpmVjG+8rLH7NjQt nMcx1PgBo4vcPgHMMhLy5IPlLTg2GjaRLFYzHng= X-Received: by 2002:aa7:95b8:: with SMTP id a24mr17478277pfk.219.1598558545190; Thu, 27 Aug 2020 13:02:25 -0700 (PDT) MIME-Version: 1.0 References: <20200827192642.1725-1-krzk@kernel.org> <20200827192642.1725-18-krzk@kernel.org> In-Reply-To: <20200827192642.1725-18-krzk@kernel.org> From: Andy Shevchenko Date: Thu, 27 Aug 2020 23:02:08 +0300 Message-ID: Subject: Re: [PATCH v2 18/18] iio: magnetometer: iio-mux: Simplify with dev_err_probe() To: Krzysztof Kozlowski Cc: Jonathan Cameron , 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 , 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:29 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 > --- > drivers/iio/multiplexer/iio-mux.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/iio/multiplexer/iio-mux.c b/drivers/iio/multiplexer/iio-mux.c > index 6910218fdb00..d219d4a86657 100644 > --- a/drivers/iio/multiplexer/iio-mux.c > +++ b/drivers/iio/multiplexer/iio-mux.c > @@ -354,11 +354,8 @@ static int mux_probe(struct platform_device *pdev) > return -ENODEV; > > parent = devm_iio_channel_get(dev, "parent"); > - if (IS_ERR(parent)) { > - if (PTR_ERR(parent) != -EPROBE_DEFER) > - dev_err(dev, "failed to get parent channel\n"); > - return PTR_ERR(parent); > - } > + if (IS_ERR(parent)) > + return dev_err_probe(dev, PTR_ERR(parent), "failed to get parent channel\n"); > > sizeof_ext_info = iio_get_channel_ext_info_count(parent); > if (sizeof_ext_info) { > -- > 2.17.1 > -- With Best Regards, Andy Shevchenko