sc = nv->os_state;
sp = sc->api_sp;
/* If nvidia_open_dev failed and we're called from nvidia_dev_dtor, we
* already released api_sp. */
if (sp == NULL)
return 0;
NV_PCI_CHECK_CONFIG_SPACE(sp, nv, TRUE, TRUE, TRUE);
rm_free_unused_clients(sp, nv, filep);