Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753655AbeAFPIX (ORCPT + 1 other); Sat, 6 Jan 2018 10:08:23 -0500 Received: from mout.web.de ([212.227.15.4]:57093 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753523AbeAFPIV (ORCPT ); Sat, 6 Jan 2018 10:08:21 -0500 Subject: [PATCH 1/5] mtd/rfd_ftl: Delete an error message for a failed memory allocation in scan_header() From: SF Markus Elfring To: linux-mtd@lists.infradead.org, Boris Brezillon , Brian Norris , Cyrille Pitchen , David Woodhouse , Marek Vasut , Richard Weinberger Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <90d58d5f-73e4-b47e-d013-19cd84c4ccda@users.sourceforge.net> Date: Sat, 6 Jan 2018 16:07:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:KxVpeYtLt0YonYiqzjfCtFYt9PSfUKYENVG1wH+svtqiVadocX8 8QOMq2uItpZonWikX/dXlTehwiACFtgG1YD/PwjoFjrpy38BjJOPtgqLa1YKLDFvNSE36yk GCOBtDI3kxX6kFdicm8dsEKvZXdAiar7BDY7awM5RlPjm7eN0O9FVzGU8i1rBXM8+ycU7U/ WS4AaKVrtcr8Se55PkxRQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:m3c1okAkK3Y=:wBvj48R4SpOVc2YlWVfzrF Y6y8nVhJmJP3d4X6YvF57iS54ztATxJQlPLhKN3SE8WIZxT4yY/2TWnX58FYagSsTRID1a3ZY ICF4NrJGdB5vSbrxK1MX2OPSLZs0vMH7TJEJM5lL9VbuEVEI5wfeMJR89mIIZAY52gzjWq11t ERUkcv+OmvR9pLD1lIqP1wwgAetmX73Mi+9Mit1kH0A5pFqSSsNfGjx2Yy8O/vWsGbd6TuGeL yesLkV4k8e8P3avRplwgbS6rsJRJoQTNTS2l2I5HUV0k23VdImoI1FBNR11n4TBkoWEPyTPv6 Z+bKR4zKm5minsgUwrTOWmP6kk929rwRIGKCPk4BcqxM1CiklZ3krQw84+yA8SCL9zw3As0hY NaRVWRRCjXlT8vONduAo7v8GQj82A/elQaSgWT/VOAk8Bb4qraxvFvywj2et/7h90sE8VOL4s u8rFHCnBx81SqUoPfHFCn9uOr1y9clilc7MrTvM/xH+0Lsb9YCw28mhvVafoiVNzT9CetHn/7 h0LUsGRMiuaEWP9gFprlFPacTC9xxvPMJ+nSZlPWABXru6BrBK56mNg/aVqfdXlFPZ/TDHXIE GgmKLCTzaJGO9EEjJ2+oyXSXnZZW2ok+bErVwgYZzHGiiCQly5ZB6Q0pgZMSI27gH/RHlBXGN 8aPq1RB5u+uiVd/GhQQIXOlxcLBMoPKHCd8ceiwoc+ZJJgjfeTGIVTTa/W1n2wT8yQgIA3aD5 0twlGek23hcgcTLng6uCROwTaFXCv7fuTYBnNa7mKdcFgDbXFhmeebUP1c7c2OVtOWXIYtvZt lwz9tI9G0Ay8DisfFQpc53L643yJarjMnBmk/PTHAKv+IIvmuI= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Sat, 6 Jan 2018 14:07:31 +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/mtd/rfd_ftl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c index d1cbf26db2c0..efff25f15d5b 100644 --- a/drivers/mtd/rfd_ftl.c +++ b/drivers/mtd/rfd_ftl.c @@ -190,11 +190,8 @@ static int scan_header(struct partition *part) goto err; part->sector_map = vmalloc(part->sector_count * sizeof(u_long)); - if (!part->sector_map) { - printk(KERN_ERR PREFIX "'%s': unable to allocate memory for " - "sector map", part->mbd.mtd->name); + if (!part->sector_map) goto err; - } for (i=0; isector_count; i++) part->sector_map[i] = -1; -- 2.15.1