Hello Danilo Krummrich, Commit bf32a3a12686 ("drm/nouveau: use GEM references instead of TTMs") from Jul 18, 2024 (linux-next), leads to the following Smatch static checker warning: drivers/gpu/drm/nouveau/dispnv50/disp.c:2818 nv50_display_destroy() error: we previously assumed 'disp->sync' could be null (see line 2816) drivers/gpu/drm/nouveau/dispnv50/disp.c 2804 static void 2805 nv50_display_destroy(struct drm_device *dev) 2806 { 2807 struct nv50_disp *disp = nv50_disp(dev); 2808 2809 nv50_audio_component_fini(nouveau_drm(dev)); 2810 2811 nvif_object_unmap(&disp->caps); 2812 nvif_object_dtor(&disp->caps); 2813 nv50_core_del(&disp->core); 2814 2815 nouveau_bo_unmap(disp->sync); 2816 if (disp->sync) ^^^^^^^^^^ Check for NULL 2817 nouveau_bo_unpin(disp->sync); --> 2818 nouveau_bo_fini(disp->sync); ^^^^^^^^^^ Unchecked dereference. The patch didn't actually introduce this bug, it just exposed it to the static checker. 2819 2820 nouveau_display(dev)->priv = NULL; 2821 kfree(disp); 2822 } regards, dan carpenter