]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: Fix error code in intel_gvt_init_device()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 14 Apr 2021 06:01:38 +0000 (09:01 +0300)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 15 Apr 2021 12:12:45 +0000 (20:12 +0800)
commita05e3b1c3ba6b80f1887c74ca6bf704d77ab1127
treee90e467efac8fa46fca879e407e63f1bc7385445
parentde94dcaf30f0f555397cc32c0b47c21c6942d4d6
drm/i915/gvt: Fix error code in intel_gvt_init_device()

The intel_gvt_init_vgpu_type_groups() function is only called from
intel_gvt_init_device().  If it fails then the intel_gvt_init_device()
prints the error code and propagates it back again.  That's a bug
because false is zero/success.  The fix is to modify it to return zero
or negative error codes and make everything consistent.

Fixes: f22590ece1a5 ("drm/i915/gvt: Move vGPU type related code into gvt file")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/YHaFQtk/DIVYK1u5@mwanda
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/gvt.c