lkml.org 
[lkml]   [2017]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/5] cris: nand: Delete an error message for a failed memory allocation in crisv32_nand_flash_probe()
From
Date
On 04/10/17 20:45, SF Markus Elfring wrote:
> 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 <elfring@users.sourceforge.net>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
> arch/cris/arch-v32/drivers/mach-a3/nandflash.c | 2 --
> arch/cris/arch-v32/drivers/mach-fs/nandflash.c | 2 --
> 2 files changed, 4 deletions(-)
>
> diff --git a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c
> index 925a98eb6d68..259aa1f46fbe 100644
> --- a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c
> +++ b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c
> @@ -136,8 +136,6 @@ struct mtd_info *__init crisv32_nand_flash_probe(void)
> /* Allocate memory for MTD device structure and private data */
> wrapper = kzalloc(sizeof(struct mtd_info_wrapper), GFP_KERNEL);
> if (!wrapper) {
> - printk(KERN_ERR "Unable to allocate CRISv32 NAND MTD "
> - "device structure.\n");
> err = -ENOMEM;
> return NULL;
> }
> diff --git a/arch/cris/arch-v32/drivers/mach-fs/nandflash.c b/arch/cris/arch-v32/drivers/mach-fs/nandflash.c
> index 53b56a429dde..1baf16ee74e8 100644
> --- a/arch/cris/arch-v32/drivers/mach-fs/nandflash.c
> +++ b/arch/cris/arch-v32/drivers/mach-fs/nandflash.c
> @@ -111,8 +111,6 @@ struct mtd_info *__init crisv32_nand_flash_probe(void)
> /* Allocate memory for MTD device structure and private data */
> wrapper = kzalloc(sizeof(struct mtd_info_wrapper), GFP_KERNEL);
> if (!wrapper) {
> - printk(KERN_ERR "Unable to allocate CRISv32 NAND MTD "
> - "device structure.\n");
> err = -ENOMEM;
> return NULL;
> }

\
 
 \ /
  Last update: 2017-10-04 22:17    [W:0.080 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site