diff mbox series

[1/2] serial: tegra: Delete an error message for a failed memory allocation in tegra_uart_probe()

Message ID aee3d79d-a59e-a3fd-6c6b-45ee46132cc6@users.sourceforge.net
State Deferred
Headers show
Series serial-Tegra: Adjustments for two function implementations | expand

Commit Message

SF Markus Elfring Dec. 7, 2017, 8:19 p.m. UTC
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(-)

Comments

Laxman Dewangan Dec. 8, 2017, 9:37 a.m. UTC | #1
On Friday 08 December 2017 01:49 AM, SF Markus Elfring wrote:
> 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.
>

Acked-by: Laxman Dewangan <ldewangan@nvidia.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jon Hunter Dec. 8, 2017, 10:42 a.m. UTC | #2
On 08/12/17 09:37, Laxman Dewangan wrote:
> On Friday 08 December 2017 01:49 AM, SF Markus Elfring wrote:
>> 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.
>>
> 
> Acked-by: Laxman Dewangan <ldewangan@nvidia.com>

Acked-by: Jon Hunter <jonathanh@nvidia.com>

Thanks!
Jon
diff mbox series

Patch

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)