Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp557624lqh; Thu, 28 Mar 2024 09:23:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXrl14jkROeaQIrpWmBhf6T2k3zUkXvaPujAb0WKa0QO0hFdIcJ45/B9jQXVnaOGXspYYBujAnj3zu5Q9R9PDVc+Swe7tINp7cvz3VQgA== X-Google-Smtp-Source: AGHT+IFFS8Fhh1cB75Vbr4HqAXk2QQhJL+Ka68k2FxAppb4t/AcId2KV/7y5ddd6Hshy3qsiHs26 X-Received: by 2002:a17:907:990a:b0:a47:3526:2e0f with SMTP id ka10-20020a170907990a00b00a4735262e0fmr2084569ejc.75.1711643033759; Thu, 28 Mar 2024 09:23:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711643033; cv=pass; d=google.com; s=arc-20160816; b=vh7w6v+4RULbJ7K5tf7z1mmzMMSMcw9+wtoAkS91m9lpDGL+OCgYXXG4Y4704f6yIZ 0oGKq6Z8glmR+vIJ7MTf7naKLJ9atNn07pVc4wEt8EGjTKlvxXJ87k1ZnZKuEK7ezk9U qq0zhq8Y9AhHEVIGWxfEBehPN/6VC77z8wO8PJ0dMBeEi5btQOIZBtKEKCt1mVjFPRW/ uomSLopMYOFyfEGZ+WqM6Je8pwl5P4OWjA4GkYm/jJoRfqhmstoxRkg/kuB7usqzPQmp 1DD3H10CQJ887GQKf2FfosFSuiRNCBMJQ5kxPtp1AUSnqkK0lQuh4Nd3fESQpdCp+/dM 1JdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=hEtCqSgfIsGh7x0z/xebilyIr+c0Q7525rYbJGBTNe8=; fh=eLJ0ZkbGfa/aqy/dGSdsvXDgUwptbVw94nQm6NI/Hjg=; b=ACSON/jUqygr2JXURNAcWDd4gSJjvBpH0fxvw53+lBO8GmesvLMfpq8wp99qQSZ4WC 3NCcxtMrW5OS+7YvJ/MzpA81EyZQVa1qCa8UYZ433lj+bOaNSDt5jBSpwf0tb+hMWpUF NiM6u4e75WWfpGg7M1j/OT8Pg1hoaY3eUFX9N07KDMphO9TQBOp5vMceWb5lydbg094b YM9Vnnu25Ey6vg7frPmzlZpemUgpcL+Y0VvnAwgqBDTBtAmlxXyi8/B8hY2ZLLJNl29E IxJcfHaEbpe5dw95LsjX1UkY7+2Q5e2xa/nO7D+HpUedOCYB/I+LNrramqNygBM79MX1 8b8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n7MxqkSO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-123243-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123243-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m25-20020a17090607d900b00a46d8d3c346si860673ejc.909.2024.03.28.09.23.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 09:23:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123243-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n7MxqkSO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-123243-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123243-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7E3D01F270DD for ; Thu, 28 Mar 2024 16:23:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6746B137C37; Thu, 28 Mar 2024 16:22:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="n7MxqkSO" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE3BB132492; Thu, 28 Mar 2024 16:22:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711642927; cv=none; b=pLLN6BwNRlFxUY+PSKKe8DMSecAhWV9UFXadyHzIuDo8xj2AJpa+ls3h77dJfp8qmOHLphZ8gvWaZRQjr7dicnIO8yPK/DpDc2zmob5UQ8XDMH9d3Y99XuAv4jw88kDMxHt9HSnJGf0n0SC7ozEa9B411luj/nTTo+Q0oS0FTGY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711642927; c=relaxed/simple; bh=Bnj4G9XpK1owNLhcShj4KfI60tdpeJg4h2+Xkc762g8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FBpwFHRlG1KtWfMV4n96IWOmM7ASfWlUC/7mTZra+LvP1S16NTniSDgtdlONyJy3PbVOovbOPn5lBFneBUqkciOC5qVe/tgCPYZBfqXc96pmwPQe0JmZ3WzzQjg+UHI2hKhZ+VjyVdILj1Mxk9zmFluD7Ndzz1YrkkzUnaCHAsw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=n7MxqkSO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 6EB9EC41612; Thu, 28 Mar 2024 16:22:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711642927; bh=Bnj4G9XpK1owNLhcShj4KfI60tdpeJg4h2+Xkc762g8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=n7MxqkSO//mrVKCmYDqxppoYKtZlKQ3LNPbWW+t3Xn/GpU3VMYBdCOy3JxSkddJq3 yL4lDqzi5umlCONYI1Mnk538nzWUVeAmxr4UZpjCe7tcHvCrMZfco1MQ/khgpSHQAY 26ZAXSFD+3H8nNTvlf7GS2BlXVgp+tyKnfKQMKZbQft1S05DrqLD4cLFFKgUdfyi5S bSHaZsefqY2sbW8GDjPLDC0kdhzfXWwDC2Re2Mk4H2xYazUlw7wG2Jt77WmQbP8aMi pf0W1XBWISs2cFr8drYHd4a5LBXnlikR5hPxyqPoDpqlxCXSzrYa/WLpWMu+3NAweB wHjBjp56VMFTg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58AF7CD1284; Thu, 28 Mar 2024 16:22:07 +0000 (UTC) From: Nuno Sa via B4 Relay Date: Thu, 28 Mar 2024 17:22:05 +0100 Subject: [PATCH v4 5/6] iio: backend: make use dev_errp_probe() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240328-ltc2983-misc-improv-v4-5-0cc428c07cd5@analog.com> References: <20240328-ltc2983-misc-improv-v4-0-0cc428c07cd5@analog.com> In-Reply-To: <20240328-ltc2983-misc-improv-v4-0-0cc428c07cd5@analog.com> To: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?q?Nuno_S=C3=A1?= , Jonathan Cameron , Lars-Peter Clausen , Michael Hennerich , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Olivier Moysan , Jyoti Bhayana X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1711642925; l=964; i=nuno.sa@analog.com; s=20231116; h=from:subject:message-id; bh=UI9LYwYsbzsvYImq/LHr54gyhLBEwgpl2jvt1KqrE14=; b=l04hnyfmitT+Wc9CJrsYi+vxjlfokLbKdPEhFV9RWHo3uTK/Oc+B5oE8Zqin/iltsRFq3jV4X Z/YjBSEYriIDM+VyTSF3MM88ds1JoMh0zkeVGDvS+BqmmGPR5T9C6YM X-Developer-Key: i=nuno.sa@analog.com; a=ed25519; pk=3NQwYA013OUYZsmDFBf8rmyyr5iQlxV/9H4/Df83o1E= X-Endpoint-Received: by B4 Relay for nuno.sa@analog.com/20231116 with auth_id=100 X-Original-From: Nuno Sa Reply-To: nuno.sa@analog.com From: Nuno Sa Using dev_errp_probe() to simplify the code. Signed-off-by: Nuno Sa --- drivers/iio/industrialio-backend.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/iio/industrialio-backend.c b/drivers/iio/industrialio-backend.c index 2fea2bbbe47f..e0b08283d667 100644 --- a/drivers/iio/industrialio-backend.c +++ b/drivers/iio/industrialio-backend.c @@ -296,11 +296,9 @@ struct iio_backend *devm_iio_backend_get(struct device *dev, const char *name) } fwnode = fwnode_find_reference(dev_fwnode(dev), "io-backends", index); - if (IS_ERR(fwnode)) { - dev_err_probe(dev, PTR_ERR(fwnode), - "Cannot get Firmware reference\n"); - return ERR_CAST(fwnode); - } + if (IS_ERR(fwnode)) + return dev_errp_probe(dev, PTR_ERR(fwnode), + "Cannot get Firmware reference\n"); guard(mutex)(&iio_back_lock); list_for_each_entry(back, &iio_back_list, entry) { -- 2.44.0