From patchwork Fri Dec 29 21:18:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10137399 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DD27F60318 for ; Fri, 29 Dec 2017 21:18:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0EE52E0E4 for ; Fri, 29 Dec 2017 21:18:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5CBD2E0EE; Fri, 29 Dec 2017 21:18:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F7E82E0E4 for ; Fri, 29 Dec 2017 21:18:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750910AbdL2VS0 (ORCPT ); Fri, 29 Dec 2017 16:18:26 -0500 Received: from mout.web.de ([212.227.15.14]:58574 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750877AbdL2VSY (ORCPT ); Fri, 29 Dec 2017 16:18:24 -0500 Received: from [192.168.1.3] ([92.227.72.214]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MeBVG-1eIRw13Wb0-00Pyna; Fri, 29 Dec 2017 22:18:15 +0100 To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Helmut Schaa , Kalle Valo , Stanislaw Gruszka Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] rt2x00: Delete an error message for a failed memory allocation in rt2x00queue_allocate() Message-ID: Date: Fri, 29 Dec 2017 22:18:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:O9oQ9BCfKBgOya38l1U5oKq5d3FC8oSXjo4GPsGfIwGmUzqAZgF CJf++v94gLSuPzehODo/dudfOU9jQPPRU158G79g7TBmXCaLRQuQknnZhnN17XIL017kmZU lIl02sMB6xWUibyi5KLBvrOzge42slT34D8P1j0PwGEvU3XUnjaAJE/bRpFileE+Yidjvu5 ioGk0KwyCElqB9vOHAAnA== X-UI-Out-Filterresults: notjunk:1; V01:K0:ZcG3ZzKtZF4=:o9nIWSQby/eIsmll6jrH8T /3xmN8VJcl9E+Nm737sDzfs9q0czV0/i33n03/19dyB7QLTL2ZUyed8gcGDajIGpRvCWEuqnH Q2tsdRoSMtTQhfrCWdDLoty0P3d3BOJHUqff2S4L4iWrUB2qO66CUGzE46c9uqMax3ySe8xvG hjkNa/sHkW2bqP3VcoDhSOQWk6Izy6dEifmaeTVyn9f4kk1DibbPXnNsYJYVQzXwO2Mj9YZlZ 2HMQ4uTqMEynXNS0IfdppSH5YHCSrf9RQTq24BmTlG33wCpAjzUNS6wtluV0bEnbYG/511NZc OKvzjrzm9IINYxrC3B96auycqN8GOr79qCG+pSRtcx7tugy3obDOjSGVJcX3e2BSGqUP4dPdI jfj5gk0zTvH08YarPzi56n8hW+iq3rP7hCpU9T9uWAMmioFgFulLw51u9As37mcRP8NzaIb5m FlgTKAfyaSHM7upvYQ7qTDfX4osCfh9eXEabzziP33zsK24WDciaGfFx/ATgsxXJOU01Ids/6 qjNk/1euEkBktSo2Lyq2qKTkS4ytJdJSGOCs+bFbCov5+rxsfyAieRrskGmUD5WUx5ZzEb67A 48ys78JvYEpmDhapab65QqZQ9nLWLt+q435i3x+gxgr/CUrbZLZ4hYcgyP1mfX7gsfAFVBZCo bGprpC7J6Eank+J7YJDHH6DnyYa0q31JhAGZNnn7TialGAwaSG0Uc23apy4rutvUFJro0J2Wv lkuXCAd4SqBdqyS4PxPUGnhwejxO/s8LMEW3pOhVj4CbkbWf/VSs5D5WaV3cMrJopseFs26U+ t+UervxqpjvAXIttovKwJ+jRNRzJ7eIV0AkUu7d25445QYkDX4= Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring 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 Acked-by: Stanislaw Gruszka --- 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