[WATCHDOG] SBC-FITPC2 watchdog driver registration fix
authorDenis Turischev <denis@compulab.co.il>
Thu, 5 Nov 2009 11:32:40 +0000 (13:32 +0200)
committerWim Van Sebroeck <wim@iguana.be>
Tue, 10 Nov 2009 15:06:52 +0000 (15:06 +0000)
This patch fixes device registration process.

Signed-off-by: Denis Turischev <denis@compulab.co.il>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/sbc_fitpc2_wdt.c

index 852ca19779179ca6762db6179ea81418fcc06f70..91430a89107c0ce0f31f9a2d92edac9ac5c8d893 100644 (file)
@@ -227,7 +227,7 @@ static int __init fitpc2_wdt_init(void)
        }
 
        err = misc_register(&fitpc2_wdt_miscdev);
-       if (!err) {
+       if (err) {
                pr_err("cannot register miscdev on minor=%d (err=%d)\n",
                                                        WATCHDOG_MINOR, err);
                goto err_margin;