drm/nouveau/drm/noveau: fix reference count leak in nouveau_fbcon_open
authorAditya Pakki <pakki001@umn.edu>
Sun, 14 Jun 2020 01:33:42 +0000 (20:33 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:22:27 +0000 (11:22 +0200)
commitbcd0b71b6e8278b2791800d0548d4d6cf18ef37e
tree7542facab36619d33f9f1efbbc4fb97147ac37b4
parentde43394549bfbd0ed90b6295e5fbef27042ab718
drm/nouveau/drm/noveau: fix reference count leak in nouveau_fbcon_open

[ Upstream commit bfad51c7633325b5d4b32444efe04329d53297b2 ]

nouveau_fbcon_open() calls calls pm_runtime_get_sync() that
increments the reference count. In case of failure, decrement the
ref count before returning the error.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/nouveau/nouveau_fbcon.c