From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-mips@linux-mips.org,
"Maciej W. Rozycki" <macro@linux-mips.org>,
"Ralf Bächle" <ralf@linux-mips.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] TC: Delete an error message for a failed memory allocation in tc_bus_add_devices()
Date: Sun, 10 Dec 2017 18:48:09 +0100 [thread overview]
Message-ID: <bfb63956-346c-aa17-5b06-fbe19ff0a5e3@users.sourceforge.net> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 10 Dec 2017 18:42:42 +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/tc/tc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tc/tc.c b/drivers/tc/tc.c
index 3be9519654e5..2deb3768a9f6 100644
--- a/drivers/tc/tc.c
+++ b/drivers/tc/tc.c
@@ -82,10 +82,9 @@ static void __init tc_bus_add_devices(struct tc_bus *tbus)
/* Found a board, allocate it an entry in the list */
tdev = kzalloc(sizeof(*tdev), GFP_KERNEL);
- if (!tdev) {
- pr_err("tc%x: unable to allocate tc_dev\n", slot);
+ if (!tdev)
goto out_err;
- }
+
dev_set_name(&tdev->dev, "tc%x", slot);
tdev->bus = tbus;
tdev->dev.parent = &tbus->dev;
--
2.15.1
next reply other threads:[~2017-12-10 17:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-10 17:48 SF Markus Elfring [this message]
2017-12-10 21:41 ` Maciej W. Rozycki
2017-12-11 2:05 ` Joe Perches
2017-12-11 13:17 ` Maciej W. Rozycki
2017-12-11 13:38 ` SF Markus Elfring
2017-12-11 8:15 ` SF Markus Elfring
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=bfb63956-346c-aa17-5b06-fbe19ff0a5e3@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.org \
--cc=ralf@linux-mips.org \
/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
all inboxes | Powered by JetHome®