vfio/mdev: remove unnecessary NULL check in mbochs_create()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 29 Apr 2021 09:53:27 +0000 (12:53 +0300)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 4 May 2021 15:56:02 +0000 (09:56 -0600)
commit698f99ed5e06946764c3be035ce9d62a2691e08c
tree98ef36167c5b4b7b556bb593f9bfa0c4a3b60c54
parent5e321ded302da4d8c5d5dd953423d9b748ab3775
vfio/mdev: remove unnecessary NULL check in mbochs_create()

Originally "type" could be NULL and these checks were required, but we
recently changed how "type" is assigned and that's no longer the case.
Now "type" points to an element in the middle of a non-NULL array.

Removing the checks does not affect runtime at all, but it makes the
code a little bit simpler to read.

Fixes: 3d3a360e570616 ("vfio/mbochs: Use mdev_get_type_group_id()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Message-Id: <20210429095327.GY1981@kadam>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
samples/vfio-mdev/mbochs.c
samples/vfio-mdev/mdpy.c