Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp192979lqe; Thu, 4 Apr 2024 04:07:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWpOPBxln7Om8XfbQMYyzLgbeuwASCQfAN4hbj2sq33uwHRobBx6xIPGJkTJtZeZoWAeBVcHrLlpGjFAS8cpsc70ODpZz53qOmErZO1Lw== X-Google-Smtp-Source: AGHT+IFygm78Y4+6bI9qp1Rq+TyQ4fd1MURPnWD+xMb8yIwxrmOqKegZOUMUj3+lnrOL5KE+X9v3 X-Received: by 2002:a05:6358:5423:b0:17f:72d6:ce2a with SMTP id u35-20020a056358542300b0017f72d6ce2amr1914092rwe.1.1712228829608; Thu, 04 Apr 2024 04:07:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712228829; cv=pass; d=google.com; s=arc-20160816; b=c/tvbi8yeccCDdKK+1IYWEnozv6UK3KWVPjiiR6O308TEWGd8P9NIy7pvo/jvp95VW mIP49KbOPgpTaNGLnqclN5Rd/1y+m4RK04S5ZKMxdV9exmXe9SbB6cuo9b5yfaAvsDyi /cpgjy5IV4BsezRNwG8ObcBywqr1gkoVM+Ykpn13PMnovDko4pxsk5YDuid92jCqYkSt Pkf5kR+1IjsfH68CERkn04RKNEzRsqsfXJvK2Ge2kD2thN9I6+j2Ur6cQ6gt8jGh7tw/ K1FrUK3c2mywPMnABD/YNVgX391zR+0lSlCWm1IMOXjTdbZEZDY+wv05XJ3GrYJ6nSI+ GWyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=DVie1SwrMjiwlrzQLb/M1yZj1Vl6Rs0UnN786RZz6OU=; fh=vKZzNv7mZIJsUM7Hoiu7CrdWZb2ElfBzbOGiRDyVNjE=; b=brrHec5TNVCfMGelERQNR0wa093FqAfSXg5MHme06oVGHjoI83cQOw05RBtBVCmcRb mk3dqQfyAHksYb/zLDfenbgkgOiXK4olxwnTbJ4AoexLyfifzM0xKXjafZxcGLqIkMe2 4LNnB9i3H82i/MM6cJy7njxh0+Rvr/gC0JskUVXMMv9nl4bLRxNgfMRWhJN2Oph4HM2n lnxOua6/GQt+2AdD6b/VM6nvXp05gb1JmpCg4BBz8FsVW1RtEQGHD3IYCfUAuXpzSx9o nIOEAlgp+/6uyYs42QtIHqmKDo/aALuUzwc1skEXem5FGO/FCr460DMwb9QmBSL+L8Oi RTEQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@analog.com header.s=DKIM header.b=nNcTYnhu; arc=pass (i=1 spf=pass spfdomain=analog.com dkim=pass dkdomain=analog.com dmarc=pass fromdomain=analog.com); spf=pass (google.com: domain of linux-kernel+bounces-131282-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131282-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=analog.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q127-20020a632a85000000b005f0be96ed8asi8895782pgq.819.2024.04.04.04.07.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 04:07:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131282-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@analog.com header.s=DKIM header.b=nNcTYnhu; arc=pass (i=1 spf=pass spfdomain=analog.com dkim=pass dkdomain=analog.com dmarc=pass fromdomain=analog.com); spf=pass (google.com: domain of linux-kernel+bounces-131282-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131282-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=analog.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E34152858F9 for ; Thu, 4 Apr 2024 11:04:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E07482C63; Thu, 4 Apr 2024 11:03:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="nNcTYnhu" Received: from mx0b-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) (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 A3F7480C0B; Thu, 4 Apr 2024 11:03:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712228637; cv=none; b=uXO8meo+PvmuyiojSEPLMGl9d78aPKF9TChXT3RFCZaFqGG/J39MnB3yjtE7NWaGXvkKlgPozYg3TtxD+g83K0Ijg2bqkoycXjszsjXyDHFFDDLFEJB5V6Dff8Am8nEWmcofyem9agDUQiyNeXFsAhvGrtVnZjKEchXwxGrDkXQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712228637; c=relaxed/simple; bh=UI9LYwYsbzsvYImq/LHr54gyhLBEwgpl2jvt1KqrE14=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=Uxs8n1km6Rk4EgsFzmKiikTpxfFKXjByD8+47xYi5PfGtDLcECfv82j7RDnpxr2h8KYDar1wfd8BJV0rK3KE+4MlNsaB0AFuLvmcWgRL9Tr3LCpKrn+BYEN1sTJVOwLjJyT/2Z70rVv5OpjHP4iPklPCSCNBEoKvjP4zgz8wrNk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=nNcTYnhu; arc=none smtp.client-ip=148.163.135.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com Received: from pps.filterd (m0375855.ppops.net [127.0.0.1]) by mx0b-00128a01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 434B0t7Q027727; Thu, 4 Apr 2024 07:03:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h= from:date:subject:mime-version:content-type :content-transfer-encoding:message-id:references:in-reply-to:to :cc; s=DKIM; bh=DVie1SwrMjiwlrzQLb/M1yZj1Vl6Rs0UnN786RZz6OU=; b= nNcTYnhu1Ypp5Uua6EW3IgTZkQDFcAXkGU0fkBA2qcVm01e3JD88yj1oDivbJcub mndqI1sopB4CKcRT1rCVYPuxlBODK3ZtVVQe+beo3UAASq+Zb41FBUuCsPwHZC6s enwT1quXTCcJxTGben6/+GtptnFXQ5nge+il2868UFKKdXJ2tl5uIOdkbFvbRvlL abKwH/i27KKEMSB1IoovhR/++Q8+0nAbfJIk3mqWBQe8Zr5ljb1ZYS/sbkHpzDhI k0V3pDToNRK1asEt5qlfNQMXlpkej1QfAA+h/wJW4qI9uIjk+8cqaaJkkr+znrY8 LSPNKcj4A3bd+y0wuqNuhw== Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0b-00128a01.pphosted.com (PPS) with ESMTPS id 3x9ty900bp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Apr 2024 07:03:22 -0400 (EDT) Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 434B3L9f018926 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 4 Apr 2024 07:03:21 -0400 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) by ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 4 Apr 2024 07:03:20 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Thu, 4 Apr 2024 07:03:20 -0400 Received: from [127.0.0.1] ([10.44.3.56]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 434B2vcB008372; Thu, 4 Apr 2024 07:03:17 -0400 From: Nuno Sa Date: Thu, 4 Apr 2024 13:06:25 +0200 Subject: [PATCH 3/4] iio: backend: make use of 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: <20240404-dev-add_dev_errp_probe-v1-3-d18e3eb7ec3f@analog.com> References: <20240404-dev-add_dev_errp_probe-v1-0-d18e3eb7ec3f@analog.com> In-Reply-To: <20240404-dev-add_dev_errp_probe-v1-0-d18e3eb7ec3f@analog.com> To: Petr Mladek , Jonathan Cameron , Lars-Peter Clausen , Olivier Moysan , Jyoti Bhayana , Andy Shevchenko , Chris Down , John Ogness , Greg Kroah-Hartman CC: , X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1712228790; l=964; i=nuno.sa@analog.com; s=20231116; h=from:subject:message-id; bh=UI9LYwYsbzsvYImq/LHr54gyhLBEwgpl2jvt1KqrE14=; b=QpVM/CwFSB08m+dHiZ29iZzwzTePxpxfwoYGgEy0hgyimYu4ynHk3Ye0RAsdO1BJBhEMRYx1M uPMEO9hw6K4DFL9AXLgnkn6Nvguu2I22cQ32KH0wgne9HEQX7MuA+AK X-Developer-Key: i=nuno.sa@analog.com; a=ed25519; pk=3NQwYA013OUYZsmDFBf8rmyyr5iQlxV/9H4/Df83o1E= X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: ohDMsrMdtH-xBzVjz5Jt0KLbHxddhxou X-Proofpoint-ORIG-GUID: ohDMsrMdtH-xBzVjz5Jt0KLbHxddhxou X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-04_07,2024-04-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 clxscore=1015 mlxlogscore=999 malwarescore=0 bulkscore=0 adultscore=0 priorityscore=1501 phishscore=0 mlxscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404040075 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