drm/mgag200: fix oops in cursor code.
authorDave Airlie <airlied@redhat.com>
Thu, 16 Jan 2014 04:28:22 +0000 (14:28 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Feb 2014 21:55:43 +0000 (13:55 -0800)
commita4457eb14534f21aa18d10bb09aad5bb3ed4960d
treecd180d60a9211a6ca3924eb482809692e6b8bce6
parent5421e0f2f3a1bc9940aa7956723d9187f41d98d7
drm/mgag200: fix oops in cursor code.

commit 53dac830537b51df555ba5e7ebb236705b7eaa7c upstream.

In some cases we enter the cursor code with file_priv = NULL causing an oops,
we also can try to unpin something that isn't pinned, and this is a good fix for it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/mgag200/mgag200_cursor.c