]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/nouveau: Fix runtime PM leak in drm_open()
authorLyude Paul <lyude@redhat.com>
Thu, 12 Jul 2018 17:02:52 +0000 (13:02 -0400)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 16 Jul 2018 08:06:29 +0000 (18:06 +1000)
commit922a8c82fafdec99688bbaea6c5889f562a42cdc
tree1b4d771662b7864bb355d010326868b5a4cb97c6
parenteaeb9010bb4bcdc20e58254fa42f3fe730a7f908
drm/nouveau: Fix runtime PM leak in drm_open()

Noticed this as I was skimming through, if we fail to allocate memory
for cli we'll end up returning without dropping the runtime PM ref we
got. Additionally, we'll even return the wrong return code! (ret most
likely will == 0 here, we want -ENOMEM).

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_drm.c