drm/nouveau: fix pm initialization order
authorDmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Tue, 25 Sep 2012 06:31:40 +0000 (10:31 +0400)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 3 Oct 2012 03:13:12 +0000 (13:13 +1000)
commitd89c8ce07168ef6cd16c71d0a9f618829e866e87
tree418e10f2489d4222f2326e8f20cfeca14d1ec9cb
parentacac7bdba61226502a230db9245ca426a67102a9
drm/nouveau: fix pm initialization order

If nouveau_pm_perflvl_get() fails, pm->profiles list will be left
uninitialized, which causes oops during nouveau_pm_fini().

Move INIT_LIST_HEAD before call to nouveau_pm_perflvl_get().

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_pm.c