If a memory allocation fails when using the DMA allocator, gk20a_instobj_dtor_dma() will be called on the failed instmem object. At this time, node->handle might not be NULL despite the call to dma_alloc_attrs() having failed. node->cpuaddr is the right member to check for such a failure, so use it instead. Reported-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> |
||
|---|---|---|
| .. | ||
| base.c | ||
| gk20a.c | ||
| Kbuild | ||
| nv04.c | ||
| nv04.h | ||
| nv40.c | ||
| nv50.c | ||
| priv.h | ||