if (phb->type != PNV_PHB_NPU_OCAPI)
                return;
 
-       mutex_lock(&links_list_lock);
+       guard(mutex)(&links_list_lock);
 
        link = find_link(dev);
        if (!link) {
                dev_warn(&dev->dev, "couldn't update actag information\n");
-               mutex_unlock(&links_list_lock);
                return;
        }
 
        dev_dbg(&dev->dev, "total actags for function: %d\n",
                link->fn_desired_actags[PCI_FUNC(dev->devfn)]);
 
-       mutex_unlock(&links_list_lock);
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pnv_ocxl_fixup_actag);
 
 {
        struct npu_link *link;
 
-       mutex_lock(&links_list_lock);
+       guard(mutex)(&links_list_lock);
 
        link = find_link(dev);
        if (!link) {
                dev_err(&dev->dev, "actag information not found\n");
-               mutex_unlock(&links_list_lock);
                return -ENODEV;
        }
        /*
        *enabled   = link->fn_actags[PCI_FUNC(dev->devfn)].count;
        *supported = link->fn_desired_actags[PCI_FUNC(dev->devfn)];
 
-       mutex_unlock(&links_list_lock);
        return 0;
 }
 EXPORT_SYMBOL_GPL(pnv_ocxl_get_actag);
         *
         * We only support one AFU-carrying function for now.
         */
-       mutex_lock(&links_list_lock);
+       guard(mutex)(&links_list_lock);
 
        link = find_link(dev);
        if (!link) {
                dev_err(&dev->dev, "actag information not found\n");
-               mutex_unlock(&links_list_lock);
                return -ENODEV;
        }
 
                        break;
                }
 
-       mutex_unlock(&links_list_lock);
        dev_dbg(&dev->dev, "%d PASIDs available for function\n",
                rc ? 0 : *count);
        return rc;