Skip to content

Commit

Permalink
staging: most: fix error comparison
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sudip Mukherjee authored and Greg Kroah-Hartman committed Feb 8, 2016
1 parent 0833ac7 commit 17ac98a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/most/mostcore/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 17ac98a

Please sign in to comment.