drivers/staging/crystalhd/crystalhd_lnx.c: adjust inconsistent IS_ERR and PTR_ERR
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / staging / crystalhd / crystalhd_lnx.c
index 5909d8d1b4d54b375b3018c15934e007646d2059..166203aeb7b441c48eed939a8e418d09ff72ea8a 100644 (file)
@@ -381,7 +381,7 @@ static int __devinit chd_dec_init_chdev(struct crystalhd_adp *adp)
        dev = device_create(crystalhd_class, NULL, MKDEV(adp->chd_dec_major, 0),
                            NULL, "crystalhd");
        if (IS_ERR(dev)) {
-               rc = PTR_ERR(crystalhd_class);
+               rc = PTR_ERR(dev);
                BCMLOG_ERR("failed to create device\n");
                goto device_create_fail;
        }