[Nouveau] [PATCH v2] device/tegra: fix uninitialized IRQ number
Alexandre Courbot
acourbot at nvidia.com
Wed Jan 27 19:30:06 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.
Fix this by using 0 as the uninitialized value everywhere.
Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
v2: use 0 as the uninitialized value, as suggested by Lucas.
drm/nouveau/nvkm/engine/device/tegra.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drm/nouveau/nvkm/engine/device/tegra.c b/drm/nouveau/nvkm/engine/device/tegra.c
index 7f8a42721eb2..6d89416f0bc1 100644
--- a/drm/nouveau/nvkm/engine/device/tegra.c
+++ b/drm/nouveau/nvkm/engine/device/tegra.c
@@ -255,7 +255,6 @@ nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func,
*pdevice = &tdev->device;
tdev->func = func;
tdev->pdev = pdev;
- tdev->irq = -1;
tdev->vdd = devm_regulator_get(&pdev->dev, "vdd");
if (IS_ERR(tdev->vdd))
--
2.7.0
More information about the Nouveau
mailing list