[Nouveau] [PATCH] device/tegra: fix uninitialized IRQ number
Alexandre Courbot
acourbot at nvidia.com
Mon Jan 25 01:44:24 PST 2016
nvkm_device_tegra_new initializes the irq member of the Tegra device
to -1 in order to signal that it is uninitialized. However,
nvkm_device_tegra_fini tests it against 0 to check whether an IRQ has
been allocated or not. This leads to free_irq being called on -1 during
device initialization.
Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
drm/nouveau/nvkm/engine/device/tegra.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drm/nouveau/nvkm/engine/device/tegra.c b/drm/nouveau/nvkm/engine/device/tegra.c
index 7f8a42721eb2..0a22439fd9ae 100644
--- a/drm/nouveau/nvkm/engine/device/tegra.c
+++ b/drm/nouveau/nvkm/engine/device/tegra.c
@@ -195,9 +195,9 @@ static void
nvkm_device_tegra_fini(struct nvkm_device *device, bool suspend)
{
struct nvkm_device_tegra *tdev = nvkm_device_tegra(device);
- if (tdev->irq) {
+ if (tdev->irq != -1) {
free_irq(tdev->irq, tdev);
- tdev->irq = 0;
+ tdev->irq = -1;
};
}
--
2.7.0
More information about the Nouveau
mailing list