Lines 489-495
Link Here
|
489 |
nv_stack_t *sp; |
489 |
nv_stack_t *sp; |
490 |
|
490 |
|
491 |
sp = sc->api_sp; |
491 |
sp = sc->api_sp; |
492 |
rm_free_unused_clients(sp, nv, filep); |
492 |
/* Prevent rm_free_unused_clients from being called with null pointer. */ |
|
|
493 |
if (sp != NULL) |
494 |
rm_free_unused_clients(sp, nv, filep); |
493 |
|
495 |
|
494 |
if (--sc->refcnt == 0) { |
496 |
if (--sc->refcnt == 0) { |
495 |
NV_UMA_ZONE_FREE_STACK(sc->api_sp); |
497 |
NV_UMA_ZONE_FREE_STACK(sc->api_sp); |
Lines 594-602
Link Here
|
594 |
|
596 |
|
595 |
sc = nv->os_state; |
597 |
sc = nv->os_state; |
596 |
sp = sc->api_sp; |
598 |
sp = sc->api_sp; |
|
|
599 |
/* If nvidia_open_dev failed and we're called from nvidia_dev_dtor, we |
600 |
* already released api_sp. */ |
597 |
|
601 |
|
598 |
NV_PCI_CHECK_CONFIG_SPACE(sp, nv, TRUE, TRUE, TRUE); |
602 |
NV_PCI_CHECK_CONFIG_SPACE(sp, nv, TRUE, TRUE, TRUE); |
599 |
rm_free_unused_clients(sp, nv, filep); |
603 |
if (sp != NULL) |
|
|
604 |
rm_free_unused_clients(sp, nv, filep); |
600 |
|
605 |
|
601 |
if (--sc->refcnt == 0) { |
606 |
if (--sc->refcnt == 0) { |
602 |
if (sc->UD_object != NULL) |
607 |
if (sc->UD_object != NULL) |