netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rt2x00: Delete an error message for a failed memory allocation in rt2x00queue_allocate()
@ 2017-12-29 21:18 SF Markus Elfring
  2018-01-03 12:26 ` Stanislaw Gruszka
  2018-01-08 15:46 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: SF Markus Elfring @ 2017-12-29 21:18 UTC (permalink / raw)
  To: linux-wireless, netdev, Helmut Schaa, Kalle Valo,
	Stanislaw Gruszka
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 29 Dec 2017 22:11: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/net/wireless/ralink/rt2x00/rt2x00queue.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
index a2c1ca5c76d1..6598cefdbe71 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
@@ -1244,10 +1244,8 @@ int rt2x00queue_allocate(struct rt2x00_dev *rt2x00dev)
 	rt2x00dev->data_queues = 2 + rt2x00dev->ops->tx_queues + req_atim;
 
 	queue = kcalloc(rt2x00dev->data_queues, sizeof(*queue), GFP_KERNEL);
-	if (!queue) {
-		rt2x00_err(rt2x00dev, "Queue allocation failed\n");
+	if (!queue)
 		return -ENOMEM;
-	}
 
 	/*
 	 * Initialize pointers
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-08 15:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-29 21:18 [PATCH] rt2x00: Delete an error message for a failed memory allocation in rt2x00queue_allocate() SF Markus Elfring
2018-01-03 12:26 ` Stanislaw Gruszka
2018-01-08 15:46 ` Kalle Valo

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).