Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp181922pxa; Wed, 26 Aug 2020 07:56:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHMzZ5SKiTP0vt1VM+y2qZq8S9h4mCawriPvKQshj94ogk3AjSRs9vh8pBEmPMTuH5eHH4 X-Received: by 2002:a50:eb96:: with SMTP id y22mr8638670edr.371.1598453801545; Wed, 26 Aug 2020 07:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598453801; cv=none; d=google.com; s=arc-20160816; b=gvHnErrpOdtfc6AFbfV30tGVH1goysOyQyp2WsxJZ/vWg3w4h9XCueiiUHvwiczBKb SoYYVi4SVLH7A5TXT2JZQS9m91wDtShW6wxHE7LvPYBA8Uv53SbogWSw1+Mvh3amalFI d+cwuyln9Epukj2zBTI66dd9mq6wu+Ne+egsrBvnYslfMgktIPirKAJitR4aZDFg8tWL tDWscXm1nOUZdZXesd+61xU5CQDd8Tz2JCDMI3Z2kF+LFwxuH5Y1WNcSv8HV35FvXvW0 uDQPxMVxHplIYo5wd272vH/Jtv3uR7ejDgjuT5YI+8TZNbvLFINaWo6LTfoZL2FyWx4z DayQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature; bh=6W6i/Bm0Jud3dD9FXZ0Xf5rW5zap3l21hwtBPy/oMXU=; b=Y3W/cyZH0iALlVRVxkZfP8KrIMbFLsJXysjffyQcEDMmSIAFQc1fsFV4oHuAWp3W8s l7JhmJqafiSQR/JUJvZkVxnuJSOUn+WIvJk3hSQ61yaue9pHFBB9uThb445gTGa6bGuv cnBY6QMPLwIA+LZUq+qYK7rfPKJrjmZScEtqw8VuVu3+ZeJEEzh6OqN2B8JoTS31WDol qIznIq6QFZ1tHNn+CQVXT8w6+IcaQQIr91td/t1NFBaBGK8lUXhLtlvPp4fU6Z8mXOC2 tiQJ/KI9YRwG3JOkK4cNxSNY+abKC/pMXw7HhIkRnqvdYf42Z4+hZl9/ricgbCitrn3Y XcPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=scRXfuu4; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u6si1783589ejf.569.2020.08.26.07.56.18; Wed, 26 Aug 2020 07:56:41 -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=@kernel.org header.s=default header.b=scRXfuu4; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728174AbgHZOxB (ORCPT + 99 others); Wed, 26 Aug 2020 10:53:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:39080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727008AbgHZOwg (ORCPT ); Wed, 26 Aug 2020 10:52:36 -0400 Received: from localhost.localdomain (unknown [194.230.155.216]) (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 AB1AE22B49; Wed, 26 Aug 2020 14:52:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598453556; bh=63gj/uTCsFYMkt/AT+w/CDkwgSGu5Zbr+ERRB5p1wnM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=scRXfuu4/yARMyjVu4iOTRUPGt1hx6peEuIk9y8eFtgIVQYLomR53puCOev9UkHHJ EyjYbSqVxfgLxRuXiNTv70BbRe4hgcfzIfnnMbBDQx+hwWmna8crZUBjRme5mKaV1S 2sU/mqv4LdijkoZN0cS4IuKctuQF3Jkf+P02J/tI= From: Krzysztof Kozlowski To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Peter Rosin , Kukjin Kim , Krzysztof Kozlowski , Michael Hennerich , Kevin Hilman , Neil Armstrong , Jerome Brunet , Martin Blumenstingl , Marek Vasut , Maxime Coquelin , Alexandre Torgue , Beniamin Bia , Tomasz Duszynski , Linus Walleij , Jonathan Bakker , Alexandru Ardelean , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH 06/16] iio: adc: meson_saradc: Simplify with dev_err_probe() Date: Wed, 26 Aug 2020 16:51:43 +0200 Message-Id: <20200826145153.10444-6-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200826145153.10444-1-krzk@kernel.org> References: <20200826145153.10444-1-krzk@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski --- drivers/iio/adc/meson_saradc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c index 93c2252c0b89..a9d06e8a576a 100644 --- a/drivers/iio/adc/meson_saradc.c +++ b/drivers/iio/adc/meson_saradc.c @@ -719,11 +719,8 @@ static int meson_sar_adc_temp_sensor_init(struct iio_dev *indio_dev) if (ret == -ENODEV) return 0; - if (ret != -EPROBE_DEFER) - dev_err(indio_dev->dev.parent, - "failed to get temperature_calib cell\n"); - - return ret; + return dev_err_probe(indio_dev->dev.parent, ret, + "failed to get temperature_calib cell\n"); } priv->tsc_regmap = -- 2.17.1