From 17ac98ac7339bdf867633d788e1bde32349012f2 Mon Sep 17 00:00:00 2001 From: Sudip Mukherjee Date: Sun, 22 Nov 2015 22:30:54 +0530 Subject: [PATCH] staging: most: fix error comparison device_create() returns ERR_PTR on error, it does not return NULL. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- drivers/staging/most/mostcore/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c index 09a5a1a1138e..e4797fdb10dd 100644 --- a/drivers/staging/most/mostcore/core.c +++ b/drivers/staging/most/mostcore/core.c @@ -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 = -- 2.39.5