Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751500AbdIENLC (ORCPT ); Tue, 5 Sep 2017 09:11:02 -0400 Received: from forward4o.cmail.yandex.net ([37.9.109.248]:54262 "EHLO forward4o.cmail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750933AbdIENLB (ORCPT ); Tue, 5 Sep 2017 09:11:01 -0400 Authentication-Results: mxback7g.mail.yandex.net; dkim=pass header.i=@yandex.ru From: Evgeniy Polyakov Envelope-From: drustafa@yandex.ru To: SF Markus Elfring , "netdev@vger.kernel.org" Cc: LKML , "kernel-janitors@vger.kernel.org" In-Reply-To: <7b206228-b3e9-5cb9-873c-75b5d8aae23b@users.sourceforge.net> References: <7b206228-b3e9-5cb9-873c-75b5d8aae23b@users.sourceforge.net> Subject: Re: [PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_entry() MIME-Version: 1.0 Message-Id: <109501504617058@web52g.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 05 Sep 2017 16:10:58 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1367 Lines: 42 Hi everyone 27.08.2017, 22:25, "SF Markus Elfring" : > From: Markus Elfring > Date: Sun, 27 Aug 2017 21:18:37 +0200 > > 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 Looks good to me, thanks Markus. There is virtually zero useful information in this print if we are in the situation, when kernel can not allocate a few bytes to run connector queue. Acked-by: Evgeniy Polyakov kernel-janitors@ please queue this patch up > --- >  drivers/connector/cn_queue.c | 4 +--- >  1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c > index 1f8bf054d11c..e4f31d679f02 100644 > --- a/drivers/connector/cn_queue.c > +++ b/drivers/connector/cn_queue.c > @@ -40,10 +40,8 @@ cn_queue_alloc_callback_entry(struct cn_queue_dev *dev, const char *name, >          struct cn_callback_entry *cbq; > >          cbq = kzalloc(sizeof(*cbq), GFP_KERNEL); > - if (!cbq) { > - pr_err("Failed to create new callback queue.\n"); > + if (!cbq) >                  return NULL; > - } > >          atomic_set(&cbq->refcnt, 1); > > -- > 2.14.1