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 09a5a1a1138ef2bdc913189bace5345c4cc45bb7..e4797fdb10dd8a3908f45d703afb30e7b133885f 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 =