aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorCoywolf Qi Hunt <coywolf@sosdg.org>2005-07-04 13:15:28 -0400
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-07-04 14:49:54 -0400
commit3a7a882420d378b59542a048075e40428c771a12 (patch)
tree98b157a507ee763a78d60af22c67bf818ef0ef2c /drivers/mtd
parent9bc7b38731dd1cc1635ab12f8de48866f603b06e (diff)
[MTD] mtdchar: Return the real error code when create_class() failed
Signed-off-by: Coywolf Qi Hunt <coywolf@sosdg.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/mtdchar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index b606f811eeb..1ed602a0f24 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * $Id: mtdchar.c,v 1.72 2005/06/30 00:23:24 tpoynor Exp $ 2 * $Id: mtdchar.c,v 1.73 2005/07/04 17:36:41 gleixner Exp $
3 * 3 *
4 * Character-device access to raw MTD devices. 4 * Character-device access to raw MTD devices.
5 * 5 *
@@ -649,7 +649,7 @@ static int __init init_mtdchar(void)
649 if (IS_ERR(mtd_class)) { 649 if (IS_ERR(mtd_class)) {
650 printk(KERN_ERR "Error creating mtd class.\n"); 650 printk(KERN_ERR "Error creating mtd class.\n");
651 unregister_chrdev(MTD_CHAR_MAJOR, "mtd"); 651 unregister_chrdev(MTD_CHAR_MAJOR, "mtd");
652 return 1; 652 return PTR_ERR(mtd_class);
653 } 653 }
654 654
655 register_mtd_user(&notifier); 655 register_mtd_user(&notifier);