Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 D75BA42586B; Sat, 12 Sep 2026 13:13:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789218827; cv=none; b=QIb4WORbY69lJ10fKL+PFebbdRGq921HNG69wXFahTiqDcf8oM/YMRtK9EoYccFvtMQyLccy0eRLj7i4S8s6D6FvfY0tnJLvwdvqqSNO3ZrOcTdABXUi5Uo/hKzksChntd3KAkB6wgqcpQ8D3M5qEAYKhBhLaDjPRyt6A5tZGC4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789218827; c=relaxed/simple; bh=kDFPu7jyQhRqDk2/wfyA0ftWYTsARBg4oOGMGeOrwpM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=es/heHevIYbz/OYKmdWrZFzfEl2v5Bsl6QADcTbr4oso8Y8ZpOeuDa1Sw/cw7eHlw8Osv/SX0bXO+pmgq155RRhFkrvqHed+bDJMKenn1y4yoO6tqaoMFCe/NTMksHU6zKvfavKDH9vFfnHPCY8+HQSXHJVUjg6d0+rj8YZfA/w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UNgTbZjC; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="UNgTbZjC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD68C1F000FF; Sat, 12 Sep 2026 13:13:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789218825; bh=G3lw8nTvSVSNfPLrRk6+EKBlreXmHJfhBijjOOVEO+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UNgTbZjCIIjgNeBWHv/WD6Rzso7OsIp2NM0y63fDeJFYtSZBOZV5HyBJriJIIAVBd /BsZtYVejWMDKfBkUVNLxL8gz9pbKZx56v3NA+26a3MnzLeyMFKyI/V+XzCxJ92DQu T42nh5/fSyqF5sh0wS/zHIlgNy00G/bpX2qA8qqY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Adrian Hunter , Frank Li , Alexandre Belloni , Sasha Levin Subject: [PATCH 6.12 1225/1376] i3c: mipi-i3c-hci: Switch PIO data allocation to devm_kzalloc() Date: Sat, 12 Sep 2026 09:00:51 +0200 Message-ID: <20260912065634.849826810@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.535295758@linuxfoundation.org> References: <20260912065607.535295758@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Adrian Hunter [ Upstream commit 11d17c2855bfc04550557017eae02e92f3eeab1c ] The driver already uses managed resources, so convert the PIO data structure allocation to devm_zalloc(). Remove the manual kfree(). Signed-off-by: Adrian Hunter Reviewed-by: Frank Li Link: https://patch.msgid.link/20260113072702.16268-7-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni Stable-dep-of: 308ecb824db3 ("i3c: mipi-i3c-hci: Fix missing STAT_IBI_STATUS_THLD in PIO mode") Signed-off-by: Sasha Levin --- drivers/i3c/master/mipi-i3c-hci/pio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i3c/master/mipi-i3c-hci/pio.c b/drivers/i3c/master/mipi-i3c-hci/pio.c index 653cee2d0645a..9f0e12d2b906a 100644 --- a/drivers/i3c/master/mipi-i3c-hci/pio.c +++ b/drivers/i3c/master/mipi-i3c-hci/pio.c @@ -141,7 +141,7 @@ static int hci_pio_init(struct i3c_hci *hci) struct hci_pio_data *pio; u32 val, size_val, rx_thresh, tx_thresh, ibi_val; - pio = kzalloc(sizeof(*pio), GFP_KERNEL); + pio = devm_kzalloc(hci->master.dev.parent, sizeof(*pio), GFP_KERNEL); if (!pio) return -ENOMEM; @@ -219,8 +219,6 @@ static void hci_pio_cleanup(struct i3c_hci *hci) BUG_ON(pio->curr_rx); BUG_ON(pio->curr_tx); BUG_ON(pio->curr_resp); - kfree(pio); - hci->io_data = NULL; } } -- 2.53.0