OSDN Git Service

drm/i915/gvt: streamline intel_vgpu_create
authorChristoph Hellwig <hch@lst.de>
Mon, 11 Apr 2022 14:13:54 +0000 (16:13 +0200)
committerZhi Wang <zhi.a.wang@intel.com>
Thu, 21 Apr 2022 11:36:56 +0000 (07:36 -0400)
commit4456641232e2c1b1eb7d179449c5800b3ce9e9c1
treea5dbf976039195f2704f98afe700b1eaa46d771f
parent37e4bdbd5bad711c7db5458041416f3925d7aae5
drm/i915/gvt: streamline intel_vgpu_create

Initialize variables at declaration time, avoid pointless gotos and
cater for the fact that intel_gvt_create_vgpu can't return NULL.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-26-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com>
drivers/gpu/drm/i915/gvt/kvmgt.c