diff mbox

[1/3] mfd/omap-usb-tll: Delete two error messages for a failed memory allocation in usbtll_omap_probe()

Message ID 7719b4e7-1081-6fa4-6f14-f45cf062482d@users.sourceforge.net (mailing list archive)
State New, archived
Headers show

Commit Message

SF Markus Elfring Jan. 15, 2018, 1:15 p.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 15 Jan 2018 13:39:25 +0100

Omit extra messages for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/mfd/omap-usb-tll.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox

Patch

diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
index 44a5d66314c6..7945efa0152e 100644
--- a/drivers/mfd/omap-usb-tll.c
+++ b/drivers/mfd/omap-usb-tll.c
@@ -222,10 +222,8 @@  static int usbtll_omap_probe(struct platform_device *pdev)
 	dev_dbg(dev, "starting TI HSUSB TLL Controller\n");
 
 	tll = devm_kzalloc(dev, sizeof(struct usbtll_omap), GFP_KERNEL);
-	if (!tll) {
-		dev_err(dev, "Memory allocation failed\n");
+	if (!tll)
 		return -ENOMEM;
-	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	tll->base = devm_ioremap_resource(dev, res);
@@ -258,7 +256,6 @@  static int usbtll_omap_probe(struct platform_device *pdev)
 						GFP_KERNEL);
 	if (!tll->ch_clk) {
 		ret = -ENOMEM;
-		dev_err(dev, "Couldn't allocate memory for channel clocks\n");
 		goto err_clk_alloc;
 	}