Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1707981pxa; Fri, 28 Aug 2020 23:49:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSHEbhKu02BcW6xHHVvcG6NHR4WbSicEQrmwTLo9QQ09p676NSNw+2GzKCQ+BVdyFiaQ0f X-Received: by 2002:a17:906:60d5:: with SMTP id f21mr2352104ejk.94.1598683773345; Fri, 28 Aug 2020 23:49:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598683773; cv=none; d=google.com; s=arc-20160816; b=nPX0KxiA4/6A37ueu43iXKNYX3TfZJI64+JCGCCJ050jtDkOEG4tebpSug4XgbXHjU vmAOgJncgCTzpFymkgUFqRp/H9YrjL/QR6oiIl/vkC0B4U+nAJneUfKfk8OzyPO25xX6 O7b7rd+I2GcxN2z29Y002aAJt3aj5zxw5rFaiV09oQsEw3R8mhnTHTBHYYlrY2dAyTqf 2CM3rY17BWsdrt36ywbGT9vyPSpSKKDT8uHUuEjS9xdtSjqaP1/r4+VUNbhWy0UvI8Eb uPpI6E1KoemVjKMVrmvknbskNLdAA75ie6ZJOylJPbni8cA8mXpbxJfYT0r2SE6p0FiG /7Mg== 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:cc:to:from:dkim-signature; bh=Ff848btJhhCJ6nki/7V+EI5AY8BWgeF2SjF4Jpko/ok=; b=hQmrVJm4lU4P35bA/27G7Q6dFEBAKsyjNUMmMjyBFoTHnzz+fD7QD4VsZGXI5DVFdw JLPpXWmhCkJ72xJuxTvvcEHbjZqRt94/ilJ4PwRbpNG6RYO6/JqS+kilU90DTRABtqxw sV26UXtnBNjUZdHP5Zvr8xu70931t6XFuSOykjz65mCWCVw81Bv22HS2NkhtxRBNNRIc ad/lIiugVbSavuEGZVt9b0EzsYwVWjUl/RKTjkG50m8/7BqLgTOWE0cp2tuv+m+sipAx TLMDyMNZr9XZ/gCJiHBH/MTxBHyZkwc4/BMOHzmyY2bP6yzwLKFiNLqXRka0jXSDPUp/ eQIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KIeViUeY; 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 e19si948457edr.7.2020.08.28.23.49.11; Fri, 28 Aug 2020 23:49:33 -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=KIeViUeY; 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 S1727015AbgH2GsY (ORCPT + 99 others); Sat, 29 Aug 2020 02:48:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:40920 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726981AbgH2GsX (ORCPT ); Sat, 29 Aug 2020 02:48:23 -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 ECC4A212CC; Sat, 29 Aug 2020 06:48:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598683702; bh=+9ZHsUV0y46Ja0TiXAlSDjBe8qgvjNNrJDCcRfHGJs8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KIeViUeY6QyTX92YBy2Cu08o+4iOH/rmeVUGnTZsxx1fz529OQybhMrqmUPpmS2eQ Wlvt3lUkfvE0ZPh5IXXdFSxAZ0xQ9LZl4mdhdoA2HDNroIJQvSb1uGynZ2GnTe7A9Y vTR2diwZNHhhkSso8ozxl0HX0nc0EAloutIphD/8= From: Krzysztof Kozlowski To: Jonathan Cameron , Lars-Peter Clausen , Peter Meerwald-Stadler , Peter Rosin , Michael Hennerich , Marek Vasut , Tomasz Duszynski , linux-iio@vger.kernel.org, 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 Cc: Andy Shevchenko , Krzysztof Kozlowski Subject: [PATCH v3 06/18] iio: adc: meson_saradc: Simplify with dev_err_probe() Date: Sat, 29 Aug 2020 08:47:14 +0200 Message-Id: <20200829064726.26268-6-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200829064726.26268-1-krzk@kernel.org> References: <20200829064726.26268-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 Reviewed-by: Andy Shevchenko --- 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