From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.web.de (mout.web.de [212.227.15.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3yGktQ717QzDrJj for ; Wed, 18 Oct 2017 05:56:14 +1100 (AEDT) Subject: [PATCH 1/2] powerpc-ps3: Delete an error message for a failed memory allocation in update_flash_db() From: SF Markus Elfring To: linuxppc-dev@lists.ozlabs.org, Benjamin Herrenschmidt , Geoff Levand , Michael Ellerman , Paul Mackerras Cc: LKML , kernel-janitors@vger.kernel.org References: <36a8ba41-7f1e-31f8-5d32-19e04393b181@users.sourceforge.net> Message-ID: Date: Tue, 17 Oct 2017 20:55:34 +0200 MIME-Version: 1.0 In-Reply-To: <36a8ba41-7f1e-31f8-5d32-19e04393b181@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Markus Elfring Date: Tue, 17 Oct 2017 20:00:31 +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 --- arch/powerpc/platforms/ps3/os-area.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c index 3db53e8aff92..f2a8875e25d1 100644 --- a/arch/powerpc/platforms/ps3/os-area.c +++ b/arch/powerpc/platforms/ps3/os-area.c @@ -625,10 +625,8 @@ static int update_flash_db(void) /* Read in header and db from flash. */ header = kmalloc(buf_len, GFP_KERNEL); - if (!header) { - pr_debug("%s: kmalloc failed\n", __func__); + if (!header) return -ENOMEM; - } count = os_area_flash_read(header, buf_len, 0); if (count < 0) { -- 2.14.2