OSDN Git Service

drm/i915: fix wrong error number report
authorAndi Shyti <andi.shyti@intel.com>
Tue, 2 Oct 2018 09:20:47 +0000 (12:20 +0300)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 2 Oct 2018 12:37:53 +0000 (13:37 +0100)
commit2ddcc982bdc51ad31bf5aa86ea02b3166cadd32e
treedb4e36e41619210b900baa53b24ec2136f8f7772
parentc0a6aa7ec2c365a44ec8eb6e9b23f1f51ad386ed
drm/i915: fix wrong error number report

During driver load it's considered that the i915_driver_create()
function fails only in case of insufficient memory. Indeed, in
case of failure of i915_driver_create(), the load function
returns indiscriminately -ENOMEM ignoring the real cause of
failure.

In i915_driver_create() get the consistent error value from
drm_dev_init() and embed it in the pointer return value.

Signed-off-by: Andi Shyti <andi.shyti@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20181002092047.14705-1-andi.shyti@intel.com
drivers/gpu/drm/i915/i915_drv.c