To: | linux-mips@linux-mips.org, "Maciej W. Rozycki" <macro@linux-mips.org>, Ralf Bächle <ralf@linux-mips.org> |
---|---|
Subject: | [PATCH] TC: Delete an error message for a failed memory allocation in tc_bus_add_devices() |
From: | SF Markus Elfring <elfring@users.sourceforge.net> |
Date: | Sun, 10 Dec 2017 18:48:09 +0100 |
Cc: | LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org |
List-archive: | <http://www.linux-mips.org/archives/linux-mips/> |
List-help: | <mailto:ecartis@linux-mips.org?Subject=help> |
List-id: | linux-mips <linux-mips.eddie.linux-mips.org> |
List-owner: | <mailto:ralf@linux-mips.org> |
List-post: | <mailto:linux-mips@linux-mips.org> |
List-software: | Ecartis version 1.0.0 |
List-subscribe: | <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips> |
List-unsubscribe: | <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips> |
Original-recipient: | rfc822;linux-mips@linux-mips.org |
Sender: | linux-mips-bounce@linux-mips.org |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
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 |
<Prev in Thread] | Current Thread | [Next in Thread> |
---|---|---|
|
Previous by Date: | Re: NFS corruption, fixed by echo 1 > /proc/sys/vm/drop_caches -- next debugging steps?, Eric Dumazet |
---|---|
Next by Date: | [PATCH 35/45] arch/mips: remove duplicate includes, Pravin Shedge |
Previous by Thread: | [PATCH v4 0/5] add Lemote YeeLoong Laptop support, Jiaxun Yang |
Next by Thread: | Re: [PATCH] TC: Delete an error message for a failed memory allocation in tc_bus_add_devices(), Maciej W. Rozycki |
Indexes: | [Date] [Thread] [Top] [All Lists] |