From: Coywolf Qi Hunt Date: Mon, 4 Jul 2005 17:15:28 +0000 (-0500) Subject: [MTD] mtdchar: Return the real error code when create_class() failed X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3a7a882420d378b59542a048075e40428c771a12;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [MTD] mtdchar: Return the real error code when create_class() failed Signed-off-by: Coywolf Qi Hunt Signed-off-by: Thomas Gleixner --- diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index b606f811eeb4..1ed602a0f24c 100644 --- 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(¬ifier);