aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/misc/c2port/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/c2port/core.c b/drivers/misc/c2port/core.c
index b5346b4db91a..b7a85f46a6c2 100644
--- a/drivers/misc/c2port/core.c
+++ b/drivers/misc/c2port/core.c
@@ -912,8 +912,8 @@ struct c2port_device *c2port_device_register(char *name,
912 912
913 c2dev->dev = device_create(c2port_class, NULL, 0, c2dev, 913 c2dev->dev = device_create(c2port_class, NULL, 0, c2dev,
914 "c2port%d", id); 914 "c2port%d", id);
915 if (unlikely(!c2dev->dev)) { 915 if (unlikely(IS_ERR(c2dev->dev))) {
916 ret = -ENOMEM; 916 ret = PTR_ERR(c2dev->dev);
917 goto error_device_create; 917 goto error_device_create;
918 } 918 }
919 dev_set_drvdata(c2dev->dev, c2dev); 919 dev_set_drvdata(c2dev->dev, c2dev);