From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7D09E30F958; Tue, 31 Mar 2026 17:09:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774976952; cv=none; b=dfPSzM33VuNiX0Zd0dlvDI2eFNKf85MDJ2voqQINFzBUNpiuRNA0rvkmaR9cjaLjbJlBH56abCFBKiWpZjnGCUZkKUMVcR8oozbm8BN8xToDd6ue9Z5EqT1sEGRw7hsUQKkXQsaf5B9iNy7S41VrXdvkoIjxG0ANf3StECCSxKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774976952; c=relaxed/simple; bh=JQ0GEp5/RbEADybvZhtSwypsC9XGdSX+JNY+W7Lrg4g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=W3mxY3ABetS9sPEhOi6IHzV/tGeAgFySc9eQk0TX5nW9/wyg1Kc8AM4UhDp+oLeWPP+2eRYFDxdgYPR+QpYr9iuf09uSZu1dJd97kqNfIw3azzBCsRlkWQmRhzMWWBNNmdjMXgWaJFRVQR5kuoGbpzxcCZi8vcu0HaavkCO5scs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sTVhEX8K; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sTVhEX8K" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11863C19423; Tue, 31 Mar 2026 17:09:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774976952; bh=JQ0GEp5/RbEADybvZhtSwypsC9XGdSX+JNY+W7Lrg4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sTVhEX8KDKO2dsXL4QdBGVq9hUZnpYzr6c51o5WbO0sELr3TOlwy9DyfXC25mlhjJ GkNWxuwYD4Adg3i/aqh2shLZIEvhXMC2SqMWmYkzyDZ+/3JjaWEyRBAeGN1+GVofPd BkmYB0RoOjUbcGO1c/JxCS7jZU5w2HwwvKEzMZCk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexander Stein , Frank Li , Vinod Koul , Sasha Levin Subject: [PATCH 6.18 291/309] dmaengine: xilinx: xdma: Fix regmap init error handling Date: Tue, 31 Mar 2026 18:23:14 +0200 Message-ID: <20260331161804.279117757@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260331161753.468533260@linuxfoundation.org> References: <20260331161753.468533260@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexander Stein [ Upstream commit e0adbf74e2a0455a6bc9628726ba87bcd0b42bf8 ] devm_regmap_init_mmio returns an ERR_PTR() upon error, not NULL. Fix the error check and also fix the error message. Use the error code from ERR_PTR() instead of the wrong value in ret. Fixes: 17ce252266c7 ("dmaengine: xilinx: xdma: Add xilinx xdma driver") Signed-off-by: Alexander Stein Reviewed-by: Frank Li Link: https://patch.msgid.link/20251014061309.283468-1-alexander.stein@ew.tq-group.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/xilinx/xdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c index 5ecf8223c112e..58e01e22b9765 100644 --- a/drivers/dma/xilinx/xdma.c +++ b/drivers/dma/xilinx/xdma.c @@ -1236,8 +1236,8 @@ static int xdma_probe(struct platform_device *pdev) xdev->rmap = devm_regmap_init_mmio(&pdev->dev, reg_base, &xdma_regmap_config); - if (!xdev->rmap) { - xdma_err(xdev, "config regmap failed: %d", ret); + if (IS_ERR(xdev->rmap)) { + xdma_err(xdev, "config regmap failed: %pe", xdev->rmap); goto failed; } INIT_LIST_HEAD(&xdev->dma_dev.channels); -- 2.53.0