[PATCH v2 07/10] staging: mt7621-mmc: Remove error message in debug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Signed-off-by: Christian Lütke-Stetzkamp <christian@xxxxxxxx>
Reviewed-by: NeilBrown <neil@xxxxxxxxxx>
---
 drivers/staging/mt7621-mmc/dbg.c | 9 ++-------
 drivers/staging/mt7621-mmc/dbg.h | 2 +-
 2 files changed, 3 insertions(+), 8 deletions(-)

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);
-- 
2.16.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux