lkml.org 
[lkml]   [2017]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/2] serial: tegra: Delete an error message for a failed memory allocation in tegra_uart_probe()
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 7 Dec 2017 21:00:05 +0100

Omit an extra message 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/tty/serial/serial-tegra.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index af2a29cfbbe9..46233c5974f1 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -1265,10 +1265,8 @@ static int tegra_uart_probe(struct platform_device *pdev)
cdata = match->data;

tup = devm_kzalloc(&pdev->dev, sizeof(*tup), GFP_KERNEL);
- if (!tup) {
- dev_err(&pdev->dev, "Failed to allocate memory for tup\n");
+ if (!tup)
return -ENOMEM;
- }

ret = tegra_uart_parse_dt(pdev, tup);
if (ret < 0)
--
2.15.1
\
 
 \ /
  Last update: 2017-12-07 21:21    [W:0.049 / U:4.728 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site