]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/misc/cxl/phb.c
cxl: Fix error handling in _cxl_pci_associate_default_context()
[karo-tx-linux.git] / drivers / misc / cxl / phb.c
index 0935d44c177097f76f309d7084d440123c7201b7..6ec69ada19f480ce62c1763e8b473a923f87951b 100644 (file)
@@ -20,7 +20,7 @@ bool _cxl_pci_associate_default_context(struct pci_dev *dev, struct cxl_afu *afu
         * in the virtual phb, we'll need a default context to attach them to.
         */
        ctx = cxl_dev_context_init(dev);
-       if (!ctx)
+       if (IS_ERR(ctx))
                return false;
        dev->dev.archdata.cxl_ctx = ctx;