]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: mt7621-mmc: Remove error message in debug
authorChristian Lütke-Stetzkamp <christian@lkamp.de>
Sat, 7 Apr 2018 08:16:22 +0000 (10:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 13:36:31 +0000 (15:36 +0200)
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 <dan.carpenter@oracle.com>
Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-mmc/dbg.c
drivers/staging/mt7621-mmc/dbg.h

index abf92a84a4176979ccc2244d0d35c4cd2478b597..3ef36ab7138d468f229fc67b0400e06569e14692 100644 (file)
@@ -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
index 5469c9d16804619df1732f869926759eb53a98db..6f00fcdaba32080674694e998beb38ff8e134cb0 100644 (file)
@@ -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);