From: Christian Lütke-Stetzkamp Date: Sat, 7 Apr 2018 08:16:22 +0000 (+0200) Subject: staging: mt7621-mmc: Remove error message in debug X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e1b8ebd25d72758535eaf78cf583a8291db85780;p=openwrt%2Fstaging%2Fblogic.git staging: mt7621-mmc: Remove error message in debug If the debug file in proc fs is not successfully created current code prints an error message, this is removed. de is also not an error pointer, so the IS_ERR() call leads to a static checker warning. The unused return value of the msdc_debug_proc_init function is also removed. Reported-by: Dan Carpenter Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/mt7621-mmc/dbg.c b/drivers/staging/mt7621-mmc/dbg.c index abf92a84a417..3ef36ab7138d 100644 --- a/drivers/staging/mt7621-mmc/dbg.c +++ b/drivers/staging/mt7621-mmc/dbg.c @@ -337,14 +337,9 @@ static const struct file_operations msdc_debug_fops = { .release = single_release, }; -int msdc_debug_proc_init(void) +void msdc_debug_proc_init(void) { - struct proc_dir_entry *de = proc_create("msdc_debug", 0667, NULL, &msdc_debug_fops); - - if (!de || IS_ERR(de)) - printk("!! Create MSDC debug PROC fail !!\n"); - - return 0; + proc_create("msdc_debug", 0667, NULL, &msdc_debug_fops); } EXPORT_SYMBOL_GPL(msdc_debug_proc_init); #endif diff --git a/drivers/staging/mt7621-mmc/dbg.h b/drivers/staging/mt7621-mmc/dbg.h index 5469c9d16804..6f00fcdaba32 100644 --- a/drivers/staging/mt7621-mmc/dbg.h +++ b/drivers/staging/mt7621-mmc/dbg.h @@ -146,7 +146,7 @@ do { \ } while (0); #endif -int msdc_debug_proc_init(void); +void msdc_debug_proc_init(void); #if 0 /* --- chhung */ void msdc_init_gpt(void);