Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6820595rdb; Fri, 15 Dec 2023 09:07:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1Khuy4XjFJFcJtxQk95qxfx7CbsQTD06SPOTr1Nmts3/Z1mMdlSSvLa0JLznEKAXqO7Dx X-Received: by 2002:a05:6e02:17ca:b0:35d:5dc3:f7f4 with SMTP id z10-20020a056e0217ca00b0035d5dc3f7f4mr19540093ilu.58.1702660072428; Fri, 15 Dec 2023 09:07:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702660072; cv=none; d=google.com; s=arc-20160816; b=fSDwBjsewIgjf6JIV4nvuuCKdM5MHW6qH+W9EINQZprNfFGT4SoiS6wRu1n9p+MrT1 lWa0+D2IhCyiNQu1zHKUwS4pD1j9X5BKyzMyc6zQtnNKF7uwF2+olOJmfj6IHO0Pi04M /tjyMai18ZxQCwV3asDTt5GLGnuMgscq/CzPwEttKo06OK2aTNNf3Cb3U285YpChPF1T FIvGC1t0J3Miq7THdIOqk4AtU2s0ge+Jy3xKYvoPLyq5fUpr2N24bHHler4GEot0xq3Y KVC6gl2kWvyVwEdU/KIjaVJsGNrw5j1TQWfkJ+VoA0Agij8R2jD4aOgl2Cgr5oBcVtFY UHLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=zyRZ/Q/TZCiWvMvtRWbxYFMjjaU8xoYNx1+SsX55M/8=; fh=7H+u7I0bdEALWzYaVOAO2NvJkKF7hcf2wW1/JO41DU8=; b=pG1dkbqHnnl53rHLfgPUmNH3tRszjeWYSHNgaeIqHGWfKzIzFrlKBoO8O5MiO9jHTT Rz47AOwjw1Ksz/8pT/L6VlQNw0IevekspPde6FixRycdTAIaFWHpv3BgSnvrvi+LPLmU 1scl/3I8RhsPaXuWytTsusTvLhLP26IDRv03YdAszH02KXpBghdIIwVSD0wW02LMsg7M vmQsd2fsBAvVRWeuVgBr8hPjdAXrcY46yMo9nnqqR+pBNf4jiWdkktMyJItU2jp8lxJa GYqYbwKI8ZC721pBGDX3dfHApq/xvdcSVKInDLys8eXU+IDoD493y3C6llprcMBRdWQq 0kUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=C9QuhZ69; spf=pass (google.com: domain of linux-kernel+bounces-1355-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1355-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q8-20020a63f948000000b00578b9fb24f6si12760620pgk.616.2023.12.15.09.07.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 09:07:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1355-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=C9QuhZ69; spf=pass (google.com: domain of linux-kernel+bounces-1355-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1355-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0D2D8B21F0B for ; Fri, 15 Dec 2023 17:07:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 27E5C3FB28; Fri, 15 Dec 2023 17:07:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="C9QuhZ69" X-Original-To: linux-kernel@vger.kernel.org Received: from mx08-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (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 CE7213EA9C; Fri, 15 Dec 2023 17:07:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 3BFFFfo1028310; Fri, 15 Dec 2023 18:07:29 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= selector1; bh=zyRZ/Q/TZCiWvMvtRWbxYFMjjaU8xoYNx1+SsX55M/8=; b=C9 QuhZ69FlZh7Gd4Dchk10XnCclyuYqLaCzsOIXH3zckGNog9toWQXR9HGn+PIhr37 LN1/HbLdE8gV+49XIRhQhE2J/bCprYRNpDifC4Nzyb2IiUkvfl8C5tJqoC3RCMGt 9+3yKAlIKvSjuPSLfqTUyWKveadgWc++TDAUaPDcioK6EPvxFxAD5TOo0sPiZmNd eyIrNSWp9o+H7rTQuguabc6YzwnDyxWdyc3C8q1jK3BwLB8+0HdxrHE6WOnyRxb4 tFXcAfdzzXIEMkVd4skDkmh/XE84UOwD+zfuXayEJDh+CqTfDSgArEJo++qiUvYK k+1UywzDi+RxV0p0zv0A== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3v0s9f0bh8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Dec 2023 18:07:29 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 961A0100052; Fri, 15 Dec 2023 18:07:28 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 8DDAB23BDFC; Fri, 15 Dec 2023 18:07:28 +0100 (CET) Received: from localhost (10.129.178.213) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 15 Dec 2023 18:07:28 +0100 From: Alain Volmat To: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Pierre-Yves MORDRET , Alain Volmat CC: Conor Dooley , , , , , Subject: [PATCH v3 1/9] i2c: stm32f7: use dev_err_probe upon calls of devm_request_irq Date: Fri, 15 Dec 2023 18:06:05 +0100 Message-ID: <20231215170617.95868-2-alain.volmat@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231215170617.95868-1-alain.volmat@foss.st.com> References: <20231215170617.95868-1-alain.volmat@foss.st.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-15_10,2023-12-14_01,2023-05-22_02 Convert error handling upon calls of devm_request_irq functions during the probe of the driver. Signed-off-by: Alain Volmat --- drivers/i2c/busses/i2c-stm32f7.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c index 983509936727..d99f152ac727 100644 --- a/drivers/i2c/busses/i2c-stm32f7.c +++ b/drivers/i2c/busses/i2c-stm32f7.c @@ -2199,19 +2199,13 @@ static int stm32f7_i2c_probe(struct platform_device *pdev) stm32f7_i2c_isr_event_thread, IRQF_ONESHOT, pdev->name, i2c_dev); - if (ret) { - dev_err(&pdev->dev, "Failed to request irq event %i\n", - irq_event); - return ret; - } + if (ret) + return dev_err_probe(&pdev->dev, ret, "Failed to request irq event\n"); ret = devm_request_irq(&pdev->dev, irq_error, stm32f7_i2c_isr_error, 0, pdev->name, i2c_dev); - if (ret) { - dev_err(&pdev->dev, "Failed to request irq error %i\n", - irq_error); - return ret; - } + if (ret) + return dev_err_probe(&pdev->dev, ret, "Failed to request irq error\n"); setup = of_device_get_match_data(&pdev->dev); if (!setup) { -- 2.25.1