summaryrefslogtreecommitdiff
path: root/drivers/misc/genwqe/card_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/genwqe/card_dev.c')
-rw-r--r--drivers/misc/genwqe/card_dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/genwqe/card_dev.c b/drivers/misc/genwqe/card_dev.c
index 91a1c151afba..8f8a6b327cdb 100644
--- a/drivers/misc/genwqe/card_dev.c
+++ b/drivers/misc/genwqe/card_dev.c
@@ -1306,8 +1306,8 @@ int genwqe_device_create(struct genwqe_dev *cd)
genwqe_attribute_groups,
GENWQE_DEVNAME "%u_card",
cd->card_idx);
- if (cd->dev == NULL) {
- rc = -ENODEV;
+ if (IS_ERR(cd->dev)) {
+ rc = PTR_ERR(cd->dev);
goto err_cdev;
}