drm/qxl: Propagate correctly errors from qxlhw_handle_to_bo
authorFrediano Ziglio <fziglio@redhat.com>
Wed, 3 Jun 2015 11:09:19 +0000 (12:09 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 5 Jun 2015 01:00:52 +0000 (11:00 +1000)
commitef1316961048988c6d044a298b5842c8288cc35b
tree59660e9a96005484be131735074182a043581303
parent74d9a6335dceb81a55821ac72daaa8f1c1554a83
drm/qxl: Propagate correctly errors from qxlhw_handle_to_bo

This function could return a NULL pointer in case of handle not
present and in case of out of memory conditions however caller
function always returned EINVAL error hiding a possible ENOMEM.
This patch change the function to return the error instead to
be able to propagate the error instead of assuming EINVAL.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/qxl/qxl_ioctl.c