{"id":2222592,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2222592/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-tegra/patch/20260413064545.2157410-1-sheetal@nvidia.com/","project":{"id":21,"url":"http://patchwork.ozlabs.org/api/1.2/projects/21/?format=json","name":"Linux Tegra Development","link_name":"linux-tegra","list_id":"linux-tegra.vger.kernel.org","list_email":"linux-tegra@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260413064545.2157410-1-sheetal@nvidia.com>","list_archive_url":null,"date":"2026-04-13T06:45:45","name":"[v4] dmaengine: tegra210-adma: Add error logging on failure paths","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"45de0e7e0d8bf54254390d6cea05e297ff0fb0cf","submitter":{"id":87986,"url":"http://patchwork.ozlabs.org/api/1.2/people/87986/?format=json","name":"Sheetal","email":"sheetal@nvidia.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-tegra/patch/20260413064545.2157410-1-sheetal@nvidia.com/mbox/","series":[{"id":499651,"url":"http://patchwork.ozlabs.org/api/1.2/series/499651/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-tegra/list/?series=499651","date":"2026-04-13T06:45:45","name":"[v4] dmaengine: tegra210-adma: Add error logging on failure paths","version":4,"mbox":"http://patchwork.ozlabs.org/series/499651/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2222592/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2222592/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linux-tegra+bounces-13729-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-tegra@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=mulYGMF7;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13729-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=\"mulYGMF7\"","smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=40.93.196.2","smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com","smtp.subspace.kernel.org;\n spf=fail smtp.mailfrom=nvidia.com"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fvHxn4MtPz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 16:46:37 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 58A253007C8A\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 06:46:34 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 2DCC63644D0;\n\tMon, 13 Apr 2026 06:46:34 +0000 (UTC)","from SA9PR02CU001.outbound.protection.outlook.com\n (mail-southcentralusazon11013002.outbound.protection.outlook.com\n [40.93.196.2])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 74D521E7660;\n\tMon, 13 Apr 2026 06:46:32 +0000 (UTC)","from BL1P223CA0041.NAMP223.PROD.OUTLOOK.COM (2603:10b6:208:5b6::12)\n by MW4PR12MB6731.namprd12.prod.outlook.com (2603:10b6:303:1eb::11) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.15; Mon, 13 Apr\n 2026 06:46:26 +0000","from BL6PEPF0001AB51.namprd04.prod.outlook.com\n (2603:10b6:208:5b6:cafe::76) by BL1P223CA0041.outlook.office365.com\n (2603:10b6:208:5b6::12) with Microsoft SMTP Server (version=TLS1_3,\n cipher=TLS_AES_256_GCM_SHA384) id 15.20.9769.48 via Frontend Transport; Mon,\n 13 Apr 2026 06:46:26 +0000","from mail.nvidia.com (216.228.118.233) by\n BL6PEPF0001AB51.mail.protection.outlook.com (10.167.242.75) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.9769.17 via Frontend Transport; Mon, 13 Apr 2026 06:46:26 +0000","from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com\n (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Sun, 12 Apr\n 2026 23:46:13 -0700","from drhqmail203.nvidia.com (10.126.190.182) by\n drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.2.2562.20; Sun, 12 Apr 2026 23:46:11 -0700","from build-sheetal-bionic-20251202.nvidia.com (10.127.8.14) by\n mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.2562.20\n via Frontend Transport; Sun, 12 Apr 2026 23:46:11 -0700"],"ARC-Seal":["i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776062794; cv=fail;\n b=pk5QDVWR2ZsVdcRtM7NhERahMcSXg7iLLyHnu2BfJT7mBP+s/lwZNuKkzin22JGDhOqFi0+2EN/bgE2b3hsvGetR3RCaOJyqgi5ZdoK8WtzrbgG6V5jJhfvl2DwaKMcQNmi+66rUEhz/Hdmt5ymam6ZfldxOWkNNGsY0BTeutVg=","i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=DN0VfubiETQCwDjr9z32+zFP0edoA/c/c3omlifUYI0HIBKzMH+v15aMWCWPdthanPRz6YxbuOePw3Jc0DieAbEqA391i4qcqynf66+jSEKf3fu+cPddnxnADippMkN6Ab47GZvctWiIBc1E/gnH6jCS0hj/6uzICVgw+crlYTYwufRykf+TE4bPFP41W32gGDxgUQQXFDX7FxwnW49TBTnH1qnEwnstrgT071CZAqYft63teRGWzhxkbANegND+hTOWXNOIVMSJbfukT+cySmHMtwlc2gggrUBAyitKR4sKv7kMLyhIIldEY8aaGGK9820lS31XPcI63S0jsXs5kQ=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776062794; c=relaxed/simple;\n\tbh=aafc4wOQWcrHRi6wGFx4R7NkB7J3PKtbJAEB66bGp/g=;\n\th=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type;\n b=M021JzrqAXWmiZW9VkynAEmdGBoapvrqIjDpfaDcC0rajz6900U++fsuuFqQcjcAyoz/X2g7pIY5CdEC38GlYJ2YD2ZPsP+OrLfTIhzmmloyuuKE+DXCDaEE0WEiIgUyjbFwS2OcfqejjjNZsIFA+l1Ug0+PvpRhler0Yny9uEk=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=TKH7cF7w4y5hQkLl0VKEgtyEYK2tS64iVlRM/1dDFZY=;\n b=u/JSUl1Q4AioLI7nLyG8IBH4A/n/8+KWbrlRASfcXFyF1Rq5EAnPogrW3OKMJ/Qu/71+U21rS6WROhdV6svx7YtP4A+UAQD8uGGe/8CAl7raGxstZLTAG2ljm+Og4/u+ykpl0g4y7r4q+ecqYUvDpTUEN72p+kSyvTRkXhtSM17pKrixLpduzrzeCCxmnsjkBBNvfv4HJyF1aAANz2ds2vrD8OWHfACu3K/45pIky/84gkMaKT2L0H5H41/u3nIs7pP2gAxDfWVwbzJOt9fRhAWVyi0myjiwZWXraUsAdwnslT7+dlpKjD819/wGY6E4IygyHrgOpYs/QY6oHIWkkQ=="],"ARC-Authentication-Results":["i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com;\n spf=fail smtp.mailfrom=nvidia.com;\n dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=mulYGMF7; arc=fail smtp.client-ip=40.93.196.2","i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.118.233) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com;\n dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none (0)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=TKH7cF7w4y5hQkLl0VKEgtyEYK2tS64iVlRM/1dDFZY=;\n b=mulYGMF7ZsO3LRB51s4olubFwdfZH+5oXeEpgErOAXdkyBpOiWPoJ/6PYl5/D3UiThhFQbMg8DIsFSNfcOM15nx5xp2tb2ufC0jX4cJP/qiGSbodb+jKv2HNrHGh2E9b3+Fs2gbWHoVV6Mg+Kid5Gx5X+o1SRqxg6TG1OzkmgrQOcytRGhr6a/RS5ePHC7M0MT7FZvcT3vB4y0o7EwSb2l1VYeVNyuAzYTTubMax7g9+fR0Ivq6I7SuhyLa4YcTkvHHwuHza0EKrY96rUrY7xohPAV0GT8FdHf9Kl88WOFNh5Ni16Tt+7MGU0GCoF1Zzp1/dUnM4UoKr+qdBAk65Mg==","X-MS-Exchange-Authentication-Results":"spf=pass (sender IP is 216.228.118.233)\n smtp.mailfrom=nvidia.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;","Received-SPF":"Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.118.233 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C","From":"Sheetal <sheetal@nvidia.com>","To":"Jon Hunter <jonathanh@nvidia.com>, Vinod Koul <vkoul@kernel.org>, \"Thierry\n Reding\" <thierry.reding@kernel.org>","CC":"Laxman Dewangan <ldewangan@nvidia.com>, Frank Li <Frank.Li@kernel.org>,\n\tMohan Kumar <mkumard@nvidia.com>, <dmaengine@vger.kernel.org>,\n\t<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Sheetal\n\t<sheetal@nvidia.com>","Subject":"[PATCH v4] dmaengine: tegra210-adma: Add error logging on failure\n paths","Date":"Mon, 13 Apr 2026 06:45:45 +0000","Message-ID":"<20260413064545.2157410-1-sheetal@nvidia.com>","X-Mailer":"git-send-email 2.17.1","Precedence":"bulk","X-Mailing-List":"linux-tegra@vger.kernel.org","List-Id":"<linux-tegra.vger.kernel.org>","List-Subscribe":"<mailto:linux-tegra+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-tegra+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain","X-NV-OnPremToCloud":"ExternallySecured","X-EOPAttributedMessage":"0","X-MS-PublicTrafficType":"Email","X-MS-TrafficTypeDiagnostic":"BL6PEPF0001AB51:EE_|MW4PR12MB6731:EE_","X-MS-Office365-Filtering-Correlation-Id":"e44487db-cad5-4f02-7b77-08de99286299","X-MS-Exchange-SenderADCheck":"1","X-MS-Exchange-AntiSpam-Relay":"0","X-Microsoft-Antispam":"\n\tBCL:0;ARA:13230040|376014|82310400026|36860700016|1800799024|18002099003|56012099003;","X-Microsoft-Antispam-Message-Info":"\n\tmwJDXzV1lbxadpVSMRfv+3WBLVB3uS9ZZfF66lBwK9hpmHiDOHZhg7kJ0+5MbPl33yLzvirC9CNSrLWLCp2Q0KjLC6hS4mk2/LTVxPufOR/Lg37q2bo4OjG5rjdtzQU30BsIvXT+nr8FKz2zbnfeVhEwkDDLA2pdKPJ+viiwsNeuollUWlcreR7K4sTHzq4lHtd2cdRe47OQlOJx+Hm3wJnByapPM/6JCGYM9cmaLBHcm+zlIFIFOC5h59cC6E5ZDSPswGWgRplyJkZu/Q8OYd/vDylv4YdOuYtHUaDKo3OXhDwirINZH9fbLPaqdfKRApZf1UDt0mn5aJVvdxxlkAYuJK17n0y+5MyQM0JSUPBYcUBIdw+K/RsKCrJXQ0RtgLxuGe9B1GPZ+2yW7jf6rY65g+77UW4xhi2AxWUkQ+ZsumR+wP3UGYGLblQrgIQcrCGaSnfHqys64RAY2nIo/0sV/E6Rr6lkUNOLBzteeBLjmhX53qSwulyNOEHTpEwc0d0kJNHBT1aCBNOSMvYaniPPMH2d41P59/5QSEFjhbFZdKB/ugM9MpDKtsU8v5bRC9aXNkxrPP9ByfW79f6bxPBnex6kXJPfOiFeJPwhyLxIdR0WPMgSVRXPI4NDoz4bYk4YR1d2/MGJwZbN3EzC7AoIfu1VkNBNbKHjtIcvQc3o4KQcWcwwFxwpkzQsRTOLblXKCg3/v2cVpqBSQnk2JiWxa/JHr7B3xA47IFx5WRv3kNc4BWJ0HAKCdmFj+O4tMCbkn3BorQ/bjLmlkdQX5Q==","X-Forefront-Antispam-Report":"\n\tCIP:216.228.118.233;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge2.nvidia.com;CAT:NONE;SFS:(13230040)(376014)(82310400026)(36860700016)(1800799024)(18002099003)(56012099003);DIR:OUT;SFP:1101;","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"1","X-MS-Exchange-AntiSpam-MessageData-0":"\n\tskStYV5yl7Q7sBME3L8Ao5x8tmfEIS18CAlXdDE+VhYjhP8HpYYBdtl+yCWB8VSL+2GYmOZo9Y5HF/ZlCItagFCH55QxJfSOeUbB9/29fqlyIJfvHfumoP8LpPk0SXF8vtTxXfPVgqPPGQwe1Yb7Wu3JA35sS4Sge6CATJG1jdgA0+EfXfqrbYEVF3TGnb/rQ/K20OxI4oLOOORwcNkeuTbf7Yiix2fgX9rKmB8yK62AjtlCm9azbzda9xylbxZp5EXp5Zn6FVelPNxTyXQ7mTL5WTPHKV/WdYrlGqDrXHKJzU22jsuP1e3K5K7qHGa6iztnJaPXUtshs0yut6qwYa+4lO+2xVQCXByPzRUZfsuSVuhoLUMvMZayS60LMnqTiUwgxGGq96GDeH8xi090imz/uHAijZxAoBIu4fjh4Yk3g0hVmTFvg3Fb8cXvbvui","X-OriginatorOrg":"Nvidia.com","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"13 Apr 2026 06:46:26.3435\n (UTC)","X-MS-Exchange-CrossTenant-Network-Message-Id":"\n e44487db-cad5-4f02-7b77-08de99286299","X-MS-Exchange-CrossTenant-Id":"43083d15-7273-40c1-b7db-39efd9ccc17a","X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp":"\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com]","X-MS-Exchange-CrossTenant-AuthSource":"\n\tBL6PEPF0001AB51.namprd04.prod.outlook.com","X-MS-Exchange-CrossTenant-AuthAs":"Anonymous","X-MS-Exchange-CrossTenant-FromEntityHeader":"HybridOnPrem","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"MW4PR12MB6731"},"content":"Add dev_err/dev_err_probe logging across failure paths to improve\ndebuggability of DMA errors during runtime and probe.\n\nUse return dev_err_probe() pattern consistently in the probe function,\nand dev_err in non-probe functions. Also convert existing dev_err calls\nin probe to dev_err_probe for consistency.\n\nSigned-off-by: Sheetal <sheetal@nvidia.com>\n---\nChanges in v4:\n- Use return dev_err_probe() pattern in probe function instead of\n  dev_err() + return\n- Use dev_err_probe consistently for all error paths in probe\n- Convert existing dev_err in probe to dev_err_probe\n\nChanges in v3:\n- Cast page_no to (unsigned long long) for %llu to fix -Wformat\n  warning on 32-bit builds where resource_size_t is unsigned int\n- Remove redundant dev_err for devm_ioremap_resource failures since\n  the API already logs errors internally.\n\nChanges in v2:\n- Fix format specifier for size_t: use %zu instead of %u for\n  desc->num_periods to resolve -Wformat warning with W=1\n\n drivers/dma/tegra210-adma.c | 52 +++++++++++++++++++++++++------------\n 1 file changed, 36 insertions(+), 16 deletions(-)","diff":"diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c\nindex 14e0c408ed1e..1ced5b37d0d8 100644\n--- a/drivers/dma/tegra210-adma.c\n+++ b/drivers/dma/tegra210-adma.c\n@@ -335,8 +335,16 @@ static int tegra_adma_request_alloc(struct tegra_adma_chan *tdc,\n \tstruct tegra_adma *tdma = tdc->tdma;\n \tunsigned int sreq_index = tdc->sreq_index;\n \n-\tif (tdc->sreq_reserved)\n-\t\treturn tdc->sreq_dir == direction ? 0 : -EINVAL;\n+\tif (tdc->sreq_reserved) {\n+\t\tif (tdc->sreq_dir != direction) {\n+\t\t\tdev_err(tdma->dev,\n+\t\t\t\t\"DMA request direction mismatch: reserved=%s, requested=%s\\n\",\n+\t\t\t\tdmaengine_get_direction_text(tdc->sreq_dir),\n+\t\t\t\tdmaengine_get_direction_text(direction));\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t\treturn 0;\n+\t}\n \n \tif (sreq_index > tdma->cdata->ch_req_max) {\n \t\tdev_err(tdma->dev, \"invalid DMA request\\n\");\n@@ -665,8 +673,11 @@ static int tegra_adma_set_xfer_params(struct tegra_adma_chan *tdc,\n \tconst struct tegra_adma_chip_data *cdata = tdc->tdma->cdata;\n \tunsigned int burst_size, adma_dir, fifo_size_shift;\n \n-\tif (desc->num_periods > ADMA_CH_CONFIG_MAX_BUFS)\n+\tif (desc->num_periods > ADMA_CH_CONFIG_MAX_BUFS) {\n+\t\tdev_err(tdc2dev(tdc), \"invalid DMA periods %zu (max %u)\\n\",\n+\t\t\tdesc->num_periods, ADMA_CH_CONFIG_MAX_BUFS);\n \t\treturn -EINVAL;\n+\t}\n \n \tswitch (direction) {\n \tcase DMA_MEM_TO_DEV:\n@@ -1029,8 +1040,8 @@ static int tegra_adma_probe(struct platform_device *pdev)\n \n \tcdata = of_device_get_match_data(&pdev->dev);\n \tif (!cdata) {\n-\t\tdev_err(&pdev->dev, \"device match data not found\\n\");\n-\t\treturn -ENODEV;\n+\t\treturn dev_err_probe(&pdev->dev, -ENODEV,\n+\t\t\t\t     \"device match data not found\\n\");\n \t}\n \n \ttdma = devm_kzalloc(&pdev->dev,\n@@ -1056,7 +1067,8 @@ static int tegra_adma_probe(struct platform_device *pdev)\n \t\t\tunsigned int ch_base_offset;\n \n \t\t\tif (res_page->start < res_base->start)\n-\t\t\t\treturn -EINVAL;\n+\t\t\t\treturn dev_err_probe(&pdev->dev, -EINVAL,\n+\t\t\t\t\t\t     \"invalid page/global resource order\\n\");\n \t\t\tpage_offset = res_page->start - res_base->start;\n \t\t\tch_base_offset = cdata->ch_base_offset;\n \t\t\tif (!ch_base_offset)\n@@ -1064,7 +1076,9 @@ static int tegra_adma_probe(struct platform_device *pdev)\n \n \t\t\tpage_no = div_u64(page_offset, ch_base_offset);\n \t\t\tif (!page_no || page_no > INT_MAX)\n-\t\t\t\treturn -EINVAL;\n+\t\t\t\treturn dev_err_probe(&pdev->dev, -EINVAL,\n+\t\t\t\t\t\t     \"invalid page number %llu\\n\",\n+\t\t\t\t\t\t     (unsigned long long)page_no);\n \n \t\t\ttdma->ch_page_no = page_no - 1;\n \t\t\ttdma->base_addr = devm_ioremap_resource(&pdev->dev, res_base);\n@@ -1079,7 +1093,8 @@ static int tegra_adma_probe(struct platform_device *pdev)\n \t\t\tif (IS_ERR(tdma->base_addr))\n \t\t\t\treturn PTR_ERR(tdma->base_addr);\n \t\t} else {\n-\t\t\treturn -ENODEV;\n+\t\t\treturn dev_err_probe(&pdev->dev, -ENODEV,\n+\t\t\t\t\t     \"failed to get memory resource\\n\");\n \t\t}\n \n \t\ttdma->ch_base_addr = tdma->base_addr + cdata->ch_base_offset;\n@@ -1087,8 +1102,8 @@ static int tegra_adma_probe(struct platform_device *pdev)\n \n \ttdma->ahub_clk = devm_clk_get(&pdev->dev, \"d_audio\");\n \tif (IS_ERR(tdma->ahub_clk)) {\n-\t\tdev_err(&pdev->dev, \"Error: Missing ahub controller clock\\n\");\n-\t\treturn PTR_ERR(tdma->ahub_clk);\n+\t\treturn dev_err_probe(&pdev->dev, PTR_ERR(tdma->ahub_clk),\n+\t\t\t\t     \"failed to get ahub clock\\n\");\n \t}\n \n \ttdma->dma_chan_mask = devm_kzalloc(&pdev->dev,\n@@ -1104,8 +1119,8 @@ static int tegra_adma_probe(struct platform_device *pdev)\n \t\t\t\t\t (u32 *)tdma->dma_chan_mask,\n \t\t\t\t\t BITS_TO_U32(tdma->nr_channels));\n \tif (ret < 0 && (ret != -EINVAL)) {\n-\t\tdev_err(&pdev->dev, \"dma-channel-mask is not complete.\\n\");\n-\t\treturn ret;\n+\t\treturn dev_err_probe(&pdev->dev, ret,\n+\t\t\t\t     \"dma-channel-mask is not complete.\\n\");\n \t}\n \n \tINIT_LIST_HEAD(&tdma->dma_dev.channels);\n@@ -1130,6 +1145,7 @@ static int tegra_adma_probe(struct platform_device *pdev)\n \t\ttdc->irq = of_irq_get(pdev->dev.of_node, i);\n \t\tif (tdc->irq <= 0) {\n \t\t\tret = tdc->irq ?: -ENXIO;\n+\t\t\tdev_err_probe(&pdev->dev, ret, \"failed to get IRQ for channel %d\\n\", i);\n \t\t\tgoto irq_dispose;\n \t\t}\n \n@@ -1141,12 +1157,16 @@ static int tegra_adma_probe(struct platform_device *pdev)\n \tpm_runtime_enable(&pdev->dev);\n \n \tret = pm_runtime_resume_and_get(&pdev->dev);\n-\tif (ret < 0)\n+\tif (ret < 0) {\n+\t\tdev_err_probe(&pdev->dev, ret, \"runtime PM resume failed\\n\");\n \t\tgoto rpm_disable;\n+\t}\n \n \tret = tegra_adma_init(tdma);\n-\tif (ret)\n+\tif (ret) {\n+\t\tdev_err_probe(&pdev->dev, ret, \"failed to initialize ADMA\\n\");\n \t\tgoto rpm_put;\n+\t}\n \n \tdma_cap_set(DMA_SLAVE, tdma->dma_dev.cap_mask);\n \tdma_cap_set(DMA_PRIVATE, tdma->dma_dev.cap_mask);\n@@ -1172,14 +1192,14 @@ static int tegra_adma_probe(struct platform_device *pdev)\n \n \tret = dma_async_device_register(&tdma->dma_dev);\n \tif (ret < 0) {\n-\t\tdev_err(&pdev->dev, \"ADMA registration failed: %d\\n\", ret);\n+\t\tdev_err_probe(&pdev->dev, ret, \"ADMA registration failed\\n\");\n \t\tgoto rpm_put;\n \t}\n \n \tret = of_dma_controller_register(pdev->dev.of_node,\n \t\t\t\t\t tegra_dma_of_xlate, tdma);\n \tif (ret < 0) {\n-\t\tdev_err(&pdev->dev, \"ADMA OF registration failed %d\\n\", ret);\n+\t\tdev_err_probe(&pdev->dev, ret, \"ADMA OF registration failed\\n\");\n \t\tgoto dma_remove;\n \t}\n \n","prefixes":["v4"]}