Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751687AbeAPV0r (ORCPT + 1 other); Tue, 16 Jan 2018 16:26:47 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:41014 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751580AbeAPV0p (ORCPT ); Tue, 16 Jan 2018 16:26:45 -0500 X-Google-Smtp-Source: ACJfBovcqS/5ejay6LBoJMwE60r98jlEqIMvKpqgcWd9f2Hwf25scgJ1Ivb5XEGhSo8XEfLx92f1TA== Subject: Re: [PATCH] lightnvm/pblk-gc: Delete an error message for a failed memory allocation in pblk_gc_line_prepare_ws() To: SF Markus Elfring , linux-block@vger.kernel.org, Matias Bjorling Cc: LKML , kernel-janitors@vger.kernel.org References: <0ef6e852-9c76-ce74-6f21-c0398722c9e5@users.sourceforge.net> From: =?UTF-8?Q?Matias_Bj=c3=b8rling?= Organization: Paletta Message-ID: <8d034c60-ce01-f40d-e122-6e1ec2bc145a@bjorling.me> Date: Tue, 16 Jan 2018 22:26:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <0ef6e852-9c76-ce74-6f21-c0398722c9e5@users.sourceforge.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/16/2018 10:10 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 16 Jan 2018 22:00:15 +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 > --- > drivers/lightnvm/pblk-gc.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/lightnvm/pblk-gc.c b/drivers/lightnvm/pblk-gc.c > index 9c8e114c8a54..54cdb4360366 100644 > --- a/drivers/lightnvm/pblk-gc.c > +++ b/drivers/lightnvm/pblk-gc.c > @@ -147,10 +147,8 @@ static void pblk_gc_line_prepare_ws(struct work_struct *work) > int ret; > > invalid_bitmap = kmalloc(lm->sec_bitmap_len, GFP_KERNEL); > - if (!invalid_bitmap) { > - pr_err("pblk: could not allocate GC invalid bitmap\n"); > + if (!invalid_bitmap) > goto fail_free_ws; > - } > > emeta_buf = pblk_malloc(lm->emeta_len[0], l_mg->emeta_alloc_type, > GFP_KERNEL); > Thanks Markus. I'll queue it up for 4.17.