tree 98b157a507ee763a78d60af22c67bf818ef0ef2c
parent 9bc7b38731dd1cc1635ab12f8de48866f603b06e
author Coywolf Qi Hunt <[EMAIL PROTECTED]> Mon, 04 Jul 2005 22:15:28 -0500
committer Thomas Gleixner <[EMAIL PROTECTED]> Mon, 04 Jul 2005 20:49:54 +0200

[MTD] mtdchar: Return the real error code when create_class() failed

Signed-off-by: Coywolf Qi Hunt <[EMAIL PROTECTED]>
Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>

 drivers/mtd/mtdchar.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -1,5 +1,5 @@
 /*
- * $Id: mtdchar.c,v 1.72 2005/06/30 00:23:24 tpoynor Exp $
+ * $Id: mtdchar.c,v 1.73 2005/07/04 17:36:41 gleixner Exp $
  *
  * Character-device access to raw MTD devices.
  *
@@ -649,7 +649,7 @@ static int __init init_mtdchar(void)
        if (IS_ERR(mtd_class)) {
                printk(KERN_ERR "Error creating mtd class.\n");
                unregister_chrdev(MTD_CHAR_MAJOR, "mtd");
-               return 1;
+               return PTR_ERR(mtd_class);
        }
 
        register_mtd_user(&notifier);
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to