lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 20 Feb 2012 14:49:50 -0200
From:	Fabio Estevam <festevam@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	kernel@...gutronix.de, shawn.guo@...escale.com,
	vinod.koul@...el.com, dan.j.williams@...el.com,
	Fabio Estevam <festevam@...il.com>,
	Fabio Estevam <fabio.estevam@...escale.com>
Subject: [PATCH] dma: imx-sdma: Add error check on sdma_get_firmware

Add error check on sdma_get_firmware for the pdata case.

While at it, distinguish the error message between the pdata and dt cases.

Signed-off-by: Fabio Estevam <fabio.estevam@...escale.com>
---
 drivers/dma/imx-sdma.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index bf736ad..52a4e6a 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1388,7 +1388,11 @@ static int __init sdma_probe(struct platform_device *pdev)
 		sdma_add_scripts(sdma, pdata->script_addrs);
 
 	if (pdata) {
-		sdma_get_firmware(sdma, pdata->fw_name);
+		ret = sdma_get_firmware(sdma, pdata->fw_name);
+		if (ret) {
+			dev_err(&pdev->dev, "failed to get firmware from pdata\n");
+			goto err_init;
+		}
 	} else {
 		/*
 		 * Because that device tree does not encode ROM script address,
@@ -1404,7 +1408,7 @@ static int __init sdma_probe(struct platform_device *pdev)
 
 		ret = sdma_get_firmware(sdma, fw_name);
 		if (ret) {
-			dev_err(&pdev->dev, "failed to get firmware\n");
+			dev_err(&pdev->dev, "failed to get firmware from DT\n");
 			goto err_init;
 		}
 	}
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ