From mboxrd@z Thu Jan 1 00:00:00 1970 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 EACC33E5EC0 for ; Thu, 28 May 2026 11:43:38 +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=1779968620; cv=none; b=cc/A0IW87/TgY2o2ikoYRyS3zwtDrRQt9oALvzCRNNeiXQ3s7FfLWqbIRf1eTh5nvyq0LuRnHKqMyQT7Bb6pPkrmzhfELwwxXQ67eexqqFdGmVJ8xueYnznO/btUkQ5HEthXjaRlaCaPCGp+izssO52c6mJNCVCKyUfyBp2A39w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779968620; c=relaxed/simple; bh=qZCQW4raB/qxd/Uf6xCpW+Zcrvt5IXIcpxmk5iDTqrg=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=eJt8f33hBcubUSWWPv9/C9p37a34E5HvSNDc5d3/xv6Rm2IjXepVLprec0cTyyQQo+3036ZfWAiZ38ovEHG+61bLg0VOccam2weTIgAmmo3v4TZYCbjFkXHEAOY+iws1pTSONiH/P+gfmQw3hYm8JML25VEFv1EZmzzxf7bMSpc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uWbLOUwu; 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="uWbLOUwu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48CD81F00A3A; Thu, 28 May 2026 11:43:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779968618; bh=M0PXW4rWneqdUVgNmwR3jK697StalXnkcXtZc4MGvLY=; h=Subject:To:Cc:From:Date; b=uWbLOUwuJfr9ZMYiZX1TARJ9fIssQJ1K3NfAB2Ff9Lv3O/iy67QrV5oitZTU0M6dW OoOFh/Himbd9bmypYjyuNL6bznaDlJFSiJP9my1F7rpUU8/AzCgAAt2DIUoGq23b7w pmO3QEof1rJXI90yfuDGMV0GNWZukDlrFdI/1C98= Subject: FAILED: patch "[PATCH] spi: qup: fix error pointer deref after DMA setup failure" failed to apply to 5.15-stable tree To: johan@kernel.org,broonie@kernel.org Cc: From: Date: Thu, 28 May 2026 13:42:37 +0200 Message-ID: <2026052837-retouch-quotation-3aca@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y git checkout FETCH_HEAD git cherry-pick -x a7e8f3efd50a165ba0189f6dc57f7e51a7d149db # git commit -s git send-email --to '' --in-reply-to '2026052837-retouch-quotation-3aca@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From a7e8f3efd50a165ba0189f6dc57f7e51a7d149db Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Tue, 12 May 2026 09:43:34 +0200 Subject: [PATCH] spi: qup: fix error pointer deref after DMA setup failure The driver falls back to PIO mode if DMA setup fails during probe. Make sure to the clear the DMA channel pointers on setup failure to avoid dereferencing an error pointer (or attempting to release a channel a second time) on later probe errors or driver unbind. This issue was flagged by Sashiko when reviewing a devres allocation conversion patch. Fixes: 612762e82ae6 ("spi: qup: Add DMA capabilities") Link: https://sashiko.dev/#/patchset/20260505072909.618363-1-johan%40kernel.org?part=4 Cc: stable@vger.kernel.org # 4.1 Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20260512074334.914735-1-johan@kernel.org Signed-off-by: Mark Brown diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c index 45d9b4cb75e4..50bb7701b9d5 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c @@ -996,8 +996,11 @@ static int spi_qup_init_dma(struct spi_controller *host, resource_size_t base) err: dma_release_channel(host->dma_tx); + host->dma_tx = NULL; err_tx: dma_release_channel(host->dma_rx); + host->dma_rx = NULL; + return ret; }