Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795061415; b=qN6cQqYFV7LQUAeuLnDVMwXbUcXmXU5AXSYwANuDqZWrvUeB8YaBLjhWpNFYmU8N18W5 ZEDOZ30AGBZoU2MFFvcW+Eu+JhlCHayqcYepAG9mLcBClLuiw9B2FPaar2WNoKCw6d+9U B68rdszAZxDvl9qsuFdIg4hvxhqiKifbaISOsqGS6HKs/h/LuGHhFqac7Wb7N8c6nOJtu UWjz4/ceV+QOEUY9KzIcvMJ7WciloQ5q/0tYyIoAuSTJYoEGwrsZ1GIizdK4BWL4RTqRE q2l0XgRdERlr++gl/FPfIjYwTaQhrRWx3VSFVuD5N3hFQyvFWpT1/kNjJz4GlozOvGQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795061415; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=hdd5+PxcLOhrg6abAvIHxwJiAdut+Mk5N/os2j58ZtQ=; b=V/z2tXICQ/Mr/q3O/FiYmL19bltv+gh6YE2HcW14xZJzGte4QViqAFay1UOG4cB7bCe3 Kxts+vhhujkYRHoMigcqq/m92yF+jOSZlGmIDE8QwNJtUdrc8WOhPHRT0E4Zef3ljls/Y AVQ1ep5KSKg8IdKhe2u9ipFaIs28mWu85HllvPxJlNY6cuw7kjntaHvqbETPLYkKH7Lt4 kh9bsSB+3AtxpuHg2J9+deQfLecW1DKOJFUhVqLtvMjB2UN+j8zYIh0EOyJji1x3cBsPP nETJKpvkYerSRomFKnsBbNAN5su+ISvor0EdjAzPvSsmOao3IQFAOJpxhp8NGVVSgZA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=18a80zRk; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 68EAE606A32C; Thu, 19 Nov 2026 04:10:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=18a80zRk Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AC901F000C4; Thu, 19 Nov 2026 04:10:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795061415; bh=hdd5+PxcLOhrg6abAvIHxwJiAdut+Mk5N/os2j58ZtQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=18a80zRkBTPlipjQbU6mFlK+4XiMPM1fRieN/xgzboJSin7pFqNB1Qz/voc9Ym2yz EFCa8lBvj4a7f55nxY4LcMFGL5+3yYCa0zPRcl6F/MTFV1TIlmIkxn1TriVOCYwmd2 Yl6omZXzcSpkUS+d17d/7OFLC5Ph5rVRDqT7p1gA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Rosen Penev , Herbert Xu , Sasha Levin Subject: [PATCH 5.10 1543/1848] crypto: talitos - Use platform_get_irq() to retrieve interrupt Date: Wed, 18 Nov 2026 15:59:41 +0100 Message-ID: <20261118150024.177534846@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261118145911.150052362@linuxfoundation.org> References: <20261118145911.150052362@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rosen Penev [ Upstream commit 4a1c7518cc31430b96458202b6a5b4064ff0cfa0 ] Remove the need to call irq_dispose_mapping as needed by irq_of_parse_and_map(). Simplify the function as a result. No need for gotos anymore. Add a missing free_irq. Signed-off-by: Rosen Penev Signed-off-by: Herbert Xu Stable-dep-of: 666d66df2525 ("crypto: talitos - init tasklets before requesting IRQs") Signed-off-by: Sasha Levin --- drivers/crypto/talitos.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 0715884f88af7..7b2dc027cb9ad 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -191,7 +191,7 @@ static int reset_device(struct device *dev) && --timeout) cpu_relax(); - if (priv->irq[1]) { + if (priv->irq[1] > 0) { mcr = TALITOS_MCR_RCA1 | TALITOS_MCR_RCA3; setbits32(priv->reg + TALITOS_MCR, mcr); } @@ -3173,13 +3173,11 @@ static int talitos_remove(struct platform_device *ofdev) talitos_unregister_rng(dev); for (i = 0; i < 2; i++) - if (priv->irq[i]) { + if (priv->irq[i] > 0) free_irq(priv->irq[i], dev); - irq_dispose_mapping(priv->irq[i]); - } tasklet_kill(&priv->done_task[0]); - if (priv->irq[1]) + if (priv->irq[1] > 0) tasklet_kill(&priv->done_task[1]); return 0; @@ -3285,26 +3283,26 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev, static int talitos_probe_irq(struct platform_device *ofdev) { struct device *dev = &ofdev->dev; - struct device_node *np = ofdev->dev.of_node; struct talitos_private *priv = dev_get_drvdata(dev); int err; bool is_sec1 = has_ftr_sec1(priv); - priv->irq[0] = irq_of_parse_and_map(np, 0); - if (!priv->irq[0]) { - dev_err(dev, "failed to map irq\n"); - return -EINVAL; - } + priv->irq[0] = platform_get_irq(ofdev, 0); + if (priv->irq[0] < 0) + return priv->irq[0]; + if (is_sec1) { err = request_irq(priv->irq[0], talitos1_interrupt_4ch, 0, dev_driver_string(dev), dev); goto primary_out; } - priv->irq[1] = irq_of_parse_and_map(np, 1); + priv->irq[1] = platform_get_irq_optional(ofdev, 1); + if (priv->irq[1] == -EPROBE_DEFER) + return priv->irq[1]; /* get the primary irq line */ - if (!priv->irq[1]) { + if (priv->irq[1] < 0) { err = request_irq(priv->irq[0], talitos2_interrupt_4ch, 0, dev_driver_string(dev), dev); goto primary_out; @@ -3320,7 +3318,6 @@ static int talitos_probe_irq(struct platform_device *ofdev) dev_driver_string(dev), dev); if (err) { dev_err(dev, "failed to request secondary irq\n"); - irq_dispose_mapping(priv->irq[1]); priv->irq[1] = 0; } @@ -3329,7 +3326,6 @@ static int talitos_probe_irq(struct platform_device *ofdev) primary_out: if (err) { dev_err(dev, "failed to request primary irq\n"); - irq_dispose_mapping(priv->irq[0]); priv->irq[0] = 0; } @@ -3430,7 +3426,7 @@ static int talitos_probe(struct platform_device *ofdev) tasklet_init(&priv->done_task[0], talitos1_done_4ch, (unsigned long)dev); } else { - if (priv->irq[1]) { + if (priv->irq[1] > 0) { tasklet_init(&priv->done_task[0], talitos2_done_ch0_2, (unsigned long)dev); tasklet_init(&priv->done_task[1], talitos2_done_ch1_3, @@ -3448,7 +3444,7 @@ static int talitos_probe(struct platform_device *ofdev) for (i = 0; i < priv->num_channels; i++) { priv->chan[i].reg = priv->reg + stride * (i + 1); - if (!priv->irq[1] || !(i & 1)) + if (priv->irq[1] < 0 || !(i & 1)) priv->chan[i].reg += TALITOS_CH_BASE_OFFSET; spin_lock_init(&priv->chan[i].head_lock); -- 2.53.0