From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Subject: [PATCH 1/2] serial: tegra: Delete an error message for a failed memory allocation in tegra_uart_probe() Date: Thu, 7 Dec 2017 21:19:31 +0100 Message-ID: References: <605adc2b-3591-86fc-410a-370f48dfb14e@users.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <605adc2b-3591-86fc-410a-370f48dfb14e-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> Content-Language: en-GB Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Greg Kroah-Hartman , Jiri Slaby , Jonathan Hunter , Laxman Dewangan , Thierry Reding Cc: LKML , kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-serial@vger.kernel.org From: Markus Elfring 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 --- 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