staging: most: fix error comparison
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Sun, 22 Nov 2015 17:00:54 +0000 (22:30 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 01:34:58 +0000 (17:34 -0800)
device_create() returns ERR_PTR on error, it does not return NULL.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/mostcore/core.c

index 09a5a1a..e4797fd 100644 (file)
@@ -1869,7 +1869,7 @@ static int __init most_init(void)
 
        class_glue_dir =
                device_create(most_class, NULL, 0, NULL, "mostcore");
-       if (!class_glue_dir)
+       if (IS_ERR(class_glue_dir))
                goto exit_driver;
 
        most_aim_kset =