mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 02:46:43 +07:00
drm/nouveau/device: call nvkm_device_fini if nvkm_device_init fails
nvkm_device_fini is never called if a failure occurs in nvkm_device_init, even when unloading the module. This can lead to a resources leak (one example is the Tegra interrupt which would never be freed in that case). Fix this by calling nvkm_device_fini in nvkm_device_init's failure path. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
33bcb4c340
commit
0529a46a7a
@ -2261,6 +2261,8 @@ nvkm_device_init(struct nvkm_device *device)
|
||||
} while (--i >= 0);
|
||||
|
||||
fail:
|
||||
nvkm_device_fini(device, false);
|
||||
|
||||
nvdev_error(device, "init failed with %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user