Merge tag 'for-5.6/io_uring-vfs-2020-01-29' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / drivers / edac / sifive_edac.c
index c0cc72a..3a3dcb1 100644 (file)
@@ -54,8 +54,8 @@ static int ecc_register(struct platform_device *pdev)
        p->dci = edac_device_alloc_ctl_info(0, "sifive_ecc", 1, "sifive_ecc",
                                            1, 1, NULL, 0,
                                            edac_device_alloc_index());
-       if (IS_ERR(p->dci))
-               return PTR_ERR(p->dci);
+       if (!p->dci)
+               return -ENOMEM;
 
        p->dci->dev = &pdev->dev;
        p->dci->mod_name = "Sifive ECC Manager";