From nobody Mon Sep 28 11:38:59 2026 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FD03433057 for ; Fri, 21 Aug 2026 23:02:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787353343; cv=none; b=FAtVqYfiuybyqzAYGjvPY7lT2tnXbEuahQpgGkdnG27b++emY/+d3nwZvU3hja92QOZ3MatAqZCrbTxO0lFs7X0ckD9rNUEWHiAhYvbkouoSER75fF24XjIH2WVDyXSvFE9qcir+Jf7PNs7jae+5xvFxP9FRwHx6IYgH/Z7+36k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787353343; c=relaxed/simple; bh=zEuLCi59FgV6WCQuPZcABSe4ao+KrlKHHo3HZvY3YY0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RRJXqeMMGAGdCtq+S0AbQNX0UJHGpetZ9y/57I+y7U1200xqVGcxsHEQi2z6CnExIsabeVLn/sNIycuntoYj4b0yRtb5UwZ6b4HgKfzl2epVmUTdJZhT0Ak8c57k+m8HZAuHQNVhZTXWxG8lKilBxW/g275i6zn2lcXOr+CIHu0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=EbVLIclG; arc=none smtp.client-ip=209.85.216.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EbVLIclG" Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-38e041ea211so1394567a91.0 for ; Fri, 21 Aug 2026 16:02:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787353340; x=1787958140; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=L4K6nlhSQEP7UWfmOQMCFoOr9zDgXdEDG0G8EbGfjZc=; b=EbVLIclGRwex0wSmZ2Kc/ApnQNeJrQlRsfkfJecq23U07vkP1xh8q6AbVM2uX2dMyv WsCLYGVLVuB7n4Bg6qgZ0xNMxwv/LTErqk98fAVFDLyYcQ5KBgdj7EqE267F1v0RMVh4 QGkYS33CKE2K3hxY2kNRVlb6maRWGgo7D8txa5tvtLEK9sKPHOyt/IcXlNSiJi0qqoyA YI6RW0k3bCVZ6Fo3z0IkVBfS3BuxW+ms4oMQN1Zx7/UTlKLZmY35tV6d98b42JFS7Dji +ouWp6k1hH0sFnhR+QtgGs+Ah/6fT0a2BOkedYP8jqGMWpANARyB9xf5O6BwHSN2uqov gMIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787353340; x=1787958140; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=L4K6nlhSQEP7UWfmOQMCFoOr9zDgXdEDG0G8EbGfjZc=; b=Pa6JuFjHzEILuQ9NERKFFOn41EYpT/bFIk0NFPUiWpi94tlgRkNhUhPrtJMJnCdHEI lPb3y0+6I+pqiaksUuk/vx/5ZlhQXEraoHOdhZTIsGD2wY3XKfTC47BzD+wwe0vkihhl urI5KD8dMxmaBJyfXNeQNiBz20Xq3lAQLZgtFa63CC9+IzgKSpfAoRGHMNUPmqwu/b01 JNm/FJLhs+5adyw8qXmI5QzpgI8xkIkpGOhglS1W5fAXYvsFd4XuAcY+mHkxLt7UycSt Tq5EBQfvsJ/SP9U4fOdh1KLz3pHWUskuo+N4yJEKaY6dbLmnyNPVuBwZKEhE9qefPVsZ iEdQ== X-Forwarded-Encrypted: i=1; AHgh+RpkzPTeLfmLhO05Pz3/VvQtYKJ9Ldf7E4dzRCphcp1kKsrGMCjnYzNihxfrh9K4p8Sk1uIAjt3ldmNkmW8=@vger.kernel.org X-Gm-Message-State: AFuF++m6RzQGRffEFbl6BQ5uKC9QtfClsG5LSbBE/fYUggV7QM3Mfzqr rWHXRzlXG/S1gTf6TwvtbCBzgzgFRkgq+VxYqhWxEAf77zDddRH2e5nU X-Gm-Gg: AR+sD109cMMRiz5t2xlusiHyORqT+/xEhAPFURipUrVl1tURI8X3IqPGUAF6xR2vhmP foeCeTMfBADqYLegzqu9uHvnZWl+4f2joT0B5nr5wOD370iRM4Y7P7Nbl48qKiVIeq4lZoRk6EU Jzq86n/JpWW+uZkTr+1xNo9f4DYtVCAz+L4JTkCAMgXN5548sLRrgZe2Lm2XFNJiGa/Ig9bXIJA zuWC7mpynioPjT3zd3g2zYII1IGGOZh4p6tnRwONqHbB8OXlUVT5NU0CvodWt7JF3wY6H4MP9AV 9UOzdfXgLW6cWDfkyD78QZC7APdzu+8j3mTonpbFhcZNtEEtXQkrFwGUO4KpynQ/Aus8zJotixN u5Yqyrantqtf/g4niwxLaYPFonEjyKvKxXMFQcrS1QjLtMHnbQjH/Lssg961Yeb/PUERwqtU3im uSQvBjN9gYxQTq6Jssg+tYaHfWZRyjnWEBTr0RNCqU+fu3HrmetrojE0fcGToo2x1vilh/UczQX HRx25zAU9FdpE3B3+kt4q1X1CDd2FpyZJnJ5CVZnV8EElX0URuXJqs+2CjkZH5DnXYIi7bQoYGF 18E4azx+gtdmnErgSJKgMz9feSNk0l0BgrkoKA== X-Received: by 2002:a17:90a:f945:b0:38f:aab1:5148 with SMTP id 98e67ed59e1d1-395c35b75efmr17088863a91.13.1787353340351; Fri, 21 Aug 2026 16:02:20 -0700 (PDT) Received: from ryzen.lan ([2601:644:8000:7a86::e35]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-395e49d8b1csm552044a91.11.2026.08.21.16.02.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2026 16:02:19 -0700 (PDT) From: Rosen Penev To: linux-i2c@vger.kernel.org Cc: Andi Shyti , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/3] i2c: ibm_iic: ioremap with platform pointer Date: Fri, 21 Aug 2026 16:02:14 -0700 Message-ID: <20260821230217.319418-2-rosenp@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260821230217.319418-1-rosenp@gmail.com> References: <20260821230217.319418-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" devm_platform_ioremap_resource only needs a platform_device pointer and calling it early allows handling potential -EPROBE_DEFER. Signed-off-by: Rosen Penev --- drivers/i2c/busses/i2c-ibm_iic.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_= iic.c index 7c70e8bda24e..043cb64a2544 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c @@ -684,21 +684,21 @@ static int iic_probe(struct platform_device *ofdev) struct device_node *np =3D ofdev->dev.of_node; struct ibm_iic_private *dev; struct i2c_adapter *adap; + void __iomem *vaddr; const u32 *freq; int ret; =20 + vaddr =3D devm_platform_ioremap_resource(ofdev, 0); + if (IS_ERR(vaddr)) + return PTR_ERR(vaddr); + dev =3D kzalloc_obj(*dev); if (!dev) return -ENOMEM; =20 platform_set_drvdata(ofdev, dev); =20 - dev->vaddr =3D of_iomap(np, 0); - if (dev->vaddr =3D=3D NULL) { - dev_err(&ofdev->dev, "failed to iomap device\n"); - ret =3D -ENXIO; - goto error_cleanup; - } + dev->vaddr =3D vaddr; =20 init_waitqueue_head(&dev->wq); =20 @@ -751,9 +751,6 @@ static int iic_probe(struct platform_device *ofdev) free_irq(dev->irq, dev); } =20 - if (dev->vaddr) - iounmap(dev->vaddr); - kfree(dev); return ret; } @@ -772,7 +769,6 @@ static void iic_remove(struct platform_device *ofdev) free_irq(dev->irq, dev); } =20 - iounmap(dev->vaddr); kfree(dev); } =20 --=20 2.55.0 From nobody Mon Sep 28 11:38:59 2026 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C3C6434E28 for ; Fri, 21 Aug 2026 23:02:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787353343; cv=none; b=b4bZWNdBe0epkHb4O1kVD22O1RbW7e/PD1xDyylUp4HPyzIoXx8BPOa3qRPUryTPRkrKR5LjxiBx4uo/RvUU9djgFYEB569QKrtXJcFzRz+RJO6h/dMA77D6ogLtKs9PPgjBzD98dnXuF/e2VNQxIy1jWzK8U+6NM7CSvpDHzdk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787353343; c=relaxed/simple; bh=E6Jk8oHzULm1uWIsli4b59Exx/v+xazMCDRIGTIhm5U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B4q4Tl8oU08NGH9Uzp/c091b8+5lK+ZlyHA1lMNI29Zo0I6GVx4xqz8PIWYYTN0EolJc2SaJBQwVKyTP0lFV0iHcDruhco5mGJGu3wPIkJp8uJ7XD8HFEE6nVsYHANXZ0KSTW0AoB/HkFAJhFSvH6AVyKyb3hJSBtg3qh5YzMQ0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QG2payp8; arc=none smtp.client-ip=209.85.216.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QG2payp8" Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-382ef647e20so1585570a91.1 for ; Fri, 21 Aug 2026 16:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787353342; x=1787958142; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=5zm+5vUsDC+fChluwST+ygDIMDVB0hv5CCY814A5+yY=; b=QG2payp8c7dPttuUZ8CtpkcZ6xCIgbayA2LnoS7+sp5qgl6hGCaiZGO7UnctRCmNaw pYiQl17VZ2nrmzwp/PK4pghemIbSg0Yu4F1SpLBXjryRlcXCHFMBSAWBL4ENGLFQR2xm Pz8/PDCNmBcy9XOlAfy1EVWHtaAoR8FcFuKcI5wAi4a2j/4lGAbZj+4sG2G/+gmkjfrH 8/LE7LTLrKvQv76CzaYWl5i/i72zKWtjZGs5NPBIwG3f/a3HLGMccuGfF9RlDJ93chpA voBwv1jKxF8Mf1Rwi2+5BayqkanAueP3r9s9A2yCVgE1n9CXpZIHiJkmX1y6kXYT687u atvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787353342; x=1787958142; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=5zm+5vUsDC+fChluwST+ygDIMDVB0hv5CCY814A5+yY=; b=eatNNEpBqRrEpWgofR+i1XM101WZPneNfkKRg/AdKpMr4GHCOwjKAUqW5xHzq7KhoZ GXRrJ/a4POxAaXFMnlaPBbdjzUqlOCtZvIgq7BU524rHG+TfWRw/YtpD3BhGwHy7ucz+ g/1L9Qv859YmwNeDZSPORTuazFL+S5GKrE6f58z1yei8iO3MLHmWQMBv+BSmQ8NZDBy3 mVVZI/91m75D2Ugm8x3XCC/3NKvaNJISRK3SyQWA5goYhs9RFXnZLr9rSfojlo4rub8V dbbHRkHbBPg3x/v0YFC5FzJvy3zmIrKin6a4laQ/l1ygInuhqqFkMurOTegIwHfkvmLH h7/A== X-Forwarded-Encrypted: i=1; AHgh+RoIGADsVfKJR3QHj9gLBg1nSfgOXTAC/4WHbZFi2Kx/WU534u8boGS+hrbB6j6U/NU6NWP6Kq/Hrv2bkz8=@vger.kernel.org X-Gm-Message-State: AFuF++loopgZ3jZsctzZkM2ZeaoX6rifkZ6AAt7P2ZJnbB4bR0j5gV2N mLamqhFY1s1vIWTRL3HtfaxwzfCFnCujI7sm1WfNE0SWhNDZWX2EkQIi X-Gm-Gg: AR+sD12U/h9oJ1CUA8ZU1oUchFIbbxBmMDA3XWc8Jo0YnlcJ1U9FI+xIPrsPy5wC5tW xYJQvu5m3aXIvUh0PJ8cPDd6HAq96ltmPe7ZY7YIQcTZ/JUskYorayb7a3qruCDdZL2XT8NnkR6 r4xhY6qlNPGsy8y6rWLxYUH/M29eTiiZcIoTN+ZuwCTZBWQF+k+WzWAo8jTVTCMJ4VUFeRQMNMT 5SauV/CaMSYKuFNJFYBOLB3ARpqGsQfordNMzt/Nl3EtM2Jkd87WP20o/inxDwD1WRCk7qTMcUV QXetUp4YyjfjSbajMnImw65C7GwzqSUeUObfAQRe4cDvbH8d2Mq26HrLe/weL1rd7WlweH7TYWd oJAGgf3FXUMZco/MbOjQJc9jJ+QE/4fOH3WrgKU505Am8MJfasU1FjvkBlUpdTPkfzyutOVCez7 j58GhFnDrwqIxBZxXWBl0qIbANrGfD42RWcShdzn3in7CvOlh+soga0j9y7ldibV2BtPvst1I5B f3F676XCcyhW8lwYYhqKjspszU67ZhuzwY3u8mOSNmkWLv+588TNR2tZgH7asERzUO9wa0EsMo0 /XQmr76YceCsbs8YI3MVZAxflS6x1ekKmAUI1kQHxrY6eTng X-Received: by 2002:a17:90b:5706:b0:38f:de97:b06 with SMTP id 98e67ed59e1d1-395deea4a72mr3657075a91.5.1787353341721; Fri, 21 Aug 2026 16:02:21 -0700 (PDT) Received: from ryzen.lan ([2601:644:8000:7a86::e35]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-395e49d8b1csm552044a91.11.2026.08.21.16.02.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2026 16:02:20 -0700 (PDT) From: Rosen Penev To: linux-i2c@vger.kernel.org Cc: Andi Shyti , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/3] i2c: ibm_iic: get the irq early in probe Date: Fri, 21 Aug 2026 16:02:15 -0700 Message-ID: <20260821230217.319418-3-rosenp@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260821230217.319418-1-rosenp@gmail.com> References: <20260821230217.319418-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" platform_get_irq() can return -EPROBE_DEFER, unlike irq_of_map_and_parse(), which helps reduce work done during probe. Signed-off-by: Rosen Penev --- drivers/i2c/busses/i2c-ibm_iic.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_= iic.c index 043cb64a2544..2730c8410167 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c @@ -649,20 +649,11 @@ static inline u8 iic_clckdiv(unsigned int opb) } =20 static int iic_request_irq(struct platform_device *ofdev, - struct ibm_iic_private *dev) + struct ibm_iic_private *dev, int irq) { - struct device_node *np =3D ofdev->dev.of_node; - int irq; - if (iic_force_poll) return 0; =20 - irq =3D irq_of_parse_and_map(np, 0); - if (!irq) { - dev_err(&ofdev->dev, "irq_of_parse_and_map failed\n"); - return 0; - } - /* Disable interrupts until we finish initialization, assumes * level-sensitive IRQ setup... */ @@ -686,12 +677,19 @@ static int iic_probe(struct platform_device *ofdev) struct i2c_adapter *adap; void __iomem *vaddr; const u32 *freq; + int irq; int ret; =20 vaddr =3D devm_platform_ioremap_resource(ofdev, 0); if (IS_ERR(vaddr)) return PTR_ERR(vaddr); =20 + irq =3D platform_get_irq(ofdev, 0); + if (irq =3D=3D -EPROBE_DEFER) + return irq; + if (irq < 0) + dev_warn(&ofdev->dev, "using polling mode\n"); + dev =3D kzalloc_obj(*dev); if (!dev) return -ENOMEM; @@ -702,9 +700,8 @@ static int iic_probe(struct platform_device *ofdev) =20 init_waitqueue_head(&dev->wq); =20 - dev->irq =3D iic_request_irq(ofdev, dev); - if (!dev->irq) - dev_warn(&ofdev->dev, "using polling mode\n"); + if (irq > 0) + dev->irq =3D iic_request_irq(ofdev, dev, irq); =20 /* Board specific settings */ if (iic_force_fast || of_get_property(np, "fast-mode", NULL)) --=20 2.55.0 From nobody Mon Sep 28 11:38:59 2026 Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8AB7435A86 for ; Fri, 21 Aug 2026 23:02:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787353345; cv=none; b=tdnLGnoqCTLqNT7MNBOfiMyW3HsTh5p4DtLaHUdFG58kMHnO/haF0CpBHTr8R8M/j2DQFDRFzubYxXjVZi9Wgaj5OJb2p8hzBzwBm/slR23hlAtL2YmnWraX0JAivTsyon38OoZW4Ccw5Im48JFO4eqazw02ibhKMve+wtQj31I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787353345; c=relaxed/simple; bh=DRBZKt4gike5Fxg1DYnXLq9JQ8AI6w1fILnNE9R+e9g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YHeYbCpDTHZ3qq3zR9aV6TL4yHxro24KI298QFTtv0tOMEG2+Yt6Mzuqneu/MRrkn9iLPiqUTeHBWfi/NA4hM2PhhsBubSMWrynLjeZg22xJKTYQZYzJzxLDd62svKxZm58kqjqvvKJXdO2ZoYsmQDakWmgEONsegQ/M7JBnOIw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KPnWHPXA; arc=none smtp.client-ip=209.85.215.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KPnWHPXA" Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-c9cf07d2df6so1007014a12.2 for ; Fri, 21 Aug 2026 16:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787353343; x=1787958143; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Ui4fOFF8uuBUtlZPXrK5KtNUrjw0FyZqRoZRSQc80oY=; b=KPnWHPXAyKVBuLit74B1EFMyje0ExJESGBiUV1zOnDg2BdTr1sYTWQqq+581lGKWEk 8qr1kt2vN18hj9aH/E6Ku00s9G+a4zSSl/ZhyhJIVMIIIEbMfGS42W3BHXl3rrvwR4Zr Ueg4br1z/nS4f27uaNCiipfTX9Ni0Zrmo4tjz4tnC9Lw1O4pd4SrazReiaQypza0S4eH j/jkzg+Mx/JoxaNu8t6sGcFbwekghPbElY2pukrLAWDhpAyMG/f2EJZsJ7PNNGzGAQSM f0c3mSeBF1lxPzLkjZvcxO+F6rHohki97NGbwUPdszMtkyEuTMP7ZZqAcWzfnEiz7kdJ 6G5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787353343; x=1787958143; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=Ui4fOFF8uuBUtlZPXrK5KtNUrjw0FyZqRoZRSQc80oY=; b=QXZF2NHl4woMRPSfs2C+HA3liYu772turyaQsIPL93nBG5fkyK1QFwnlHxo1B+K1lk wp801j7KjvuWLMZRqStPgEC/HivrOH2nbmtSzqkDfJxEMgmBVm+QZSGtx+gJTmZxiaF8 ua+ZnV+L1Ucl8DzfywhhWFqSnK/qL4HVn94ACgBZJzMM1i+IDSPNNHN6kk9buf3UKY2X f+SycmZF9sCUmyNWr7u61YGUzh8Qivo0b1aKS76AcswSFIUx/9r6KtwyISMFqy9PrXpw BwS+nLz3cxNl0he0fmA43GVJp/XWWavyXzBXFUZHWTUaaEuNm7cFKy0d9cIbfJSXvBPZ 1JJw== X-Forwarded-Encrypted: i=1; AHgh+Roqo2ihusZx93I/z7d1wkr8mfAxhugiPcOC/EJ+1mFjoTL1ibjD3mCtc2nfy5dO+qHti37J+zPvWndph1c=@vger.kernel.org X-Gm-Message-State: AFuF++kxwu8osLg+UinjwgdadwFDzAhbSIHqwoJHYpfN70pycWAZkxre D/2t9eXz7UJzWMpqPyFWAIoAfK+32DSM+JOpBWrUEcALhWW95eZe1cJ8g8yC0Q== X-Gm-Gg: AR+sD12sdiBpPIZy60SNfmadHxKVg9Nvodn7jKwJKzyF41MxqBMzr8+fkW3ekomC2Bl m3GIngfAVhvKpylGRpsI56MvPqioJTSWBHHILhTzxgGEwfQ5FyLQCxm0PvlqjF7g5rHdElELxaq FyG7zwa/UBCL5JaPqLFFAYz2PEqipgeddL9IJ2UWxzsKHlsqNMv7vAvW5fOFSxDFu7gepgLM8fn fa6SxF1ajeQnqtp2dO2squQEe9wcnrvqoq6rhG+2FdSunOIuu0pHV7bnVi9gnjCKiAhdFMUwG+U l24RzJPUde8QXn6ltZmL23aBs7RlRg1CJU1gg2jYIwRDeKTdZA0LOWgk2NT1sFtTjgM5JjXhiRQ VcNRMG6M1qrRBRObCwdPQnhjEb79kkC+E79Gy0kYQfAeiY187Q38V8g2u0JPZawJeEJGKmTMRzZ +Ns8KSwBab1WGKHUlQmMeFnGnnoUPXE/tW+ZrRHCxMJxXmM4BCS5TvfKWuwWsGCfvz2fb3YiEkJ BTvIRygPT6Bt4pvkiiMFtAyefeZ4xDe+VXAgZ2l5+nnEaRKdIHmtIgW+OdnqGXNgmAXAa2I0Rh9 SLB83zKCWdgUs/g++kUhaa7R/D3Gqc80RwwzSA== X-Received: by 2002:a17:90b:1e0d:b0:395:4e0d:bc60 with SMTP id 98e67ed59e1d1-395c354d7ebmr14961191a91.9.1787353343320; Fri, 21 Aug 2026 16:02:23 -0700 (PDT) Received: from ryzen.lan ([2601:644:8000:7a86::e35]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-395e49d8b1csm552044a91.11.2026.08.21.16.02.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2026 16:02:22 -0700 (PDT) From: Rosen Penev To: linux-i2c@vger.kernel.org Cc: Andi Shyti , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 3/3] i2c: ibm_iic: use devm for main allocation Date: Fri, 21 Aug 2026 16:02:16 -0700 Message-ID: <20260821230217.319418-4-rosenp@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260821230217.319418-1-rosenp@gmail.com> References: <20260821230217.319418-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Allows getting rid of kfree in failure and remove paths. Signed-off-by: Rosen Penev --- drivers/i2c/busses/i2c-ibm_iic.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_= iic.c index 2730c8410167..8fc5f314742f 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c @@ -690,7 +690,7 @@ static int iic_probe(struct platform_device *ofdev) if (irq < 0) dev_warn(&ofdev->dev, "using polling mode\n"); =20 - dev =3D kzalloc_obj(*dev); + dev =3D devm_kzalloc(&ofdev->dev, sizeof(*dev), GFP_KERNEL); if (!dev) return -ENOMEM; =20 @@ -748,7 +748,6 @@ static int iic_probe(struct platform_device *ofdev) free_irq(dev->irq, dev); } =20 - kfree(dev); return ret; } =20 @@ -765,8 +764,6 @@ static void iic_remove(struct platform_device *ofdev) iic_interrupt_mode(dev, 0); free_irq(dev->irq, dev); } - - kfree(dev); } =20 static const struct of_device_id ibm_iic_match[] =3D { --=20 2.55.0