Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vhost: vdpa: remove unnecessary null check

container_of is never null, so this null check is
unnecessary.

Addresses-Coverity-ID: 1492006 ("Logically dead code")
Fixes: 20453a45fb06 ("vhost: introduce vDPA-based backend")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Link: https://lore.kernel.org/r/20200330235040.GA9997@embeddedor
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>

authored by

Gustavo A. R. Silva and committed by
Michael S. Tsirkin
aa21c2e7 355b36e6

-2
-2
drivers/vhost/vdpa.c
··· 678 678 int nvqs, i, r, opened; 679 679 680 680 v = container_of(inode->i_cdev, struct vhost_vdpa, cdev); 681 - if (!v) 682 - return -ENODEV; 683 681 684 682 opened = atomic_cmpxchg(&v->opened, 0, 1); 685 683 if (opened)