From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-serial@vger.kernel.org, linux-tegra@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Laxman Dewangan <ldewangan@nvidia.com>,
Thierry Reding <thierry.reding@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
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 [thread overview]
Message-ID: <aee3d79d-a59e-a3fd-6c6b-45ee46132cc6@users.sourceforge.net> (raw)
In-Reply-To: <605adc2b-3591-86fc-410a-370f48dfb14e@users.sourceforge.net>
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
next prev parent reply other threads:[~2017-12-07 20:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 20:18 [PATCH 0/2] serial-Tegra: Adjustments for two function implementations SF Markus Elfring
2017-12-07 20:19 ` SF Markus Elfring [this message]
2017-12-08 9:37 ` [PATCH 1/2] serial: tegra: Delete an error message for a failed memory allocation in tegra_uart_probe() Laxman Dewangan
2017-12-08 10:42 ` Jon Hunter
2017-12-07 20:21 ` [PATCH 2/2] serial: tegra: Fix a typo in a comment line SF Markus Elfring
2017-12-08 9:37 ` Laxman Dewangan
2017-12-08 10:42 ` Jon Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aee3d79d-a59e-a3fd-6c6b-45ee46132cc6@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=gregkh@linuxfoundation.org \
--cc=jonathanh@nvidia.com \
--cc=jslaby@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).