OpenCloudOS-Kernel/drivers/vdpa/vdpa_sim
Xie Yongji 2b847f2114 vdpa_sim: Fix return value check for vdpa_alloc_device()
The vdpa_alloc_device() returns an error pointer upon
failure, not NULL. To handle the failure correctly, this
replaces NULL check with IS_ERR() check and propagate the
error upwards.

Fixes: 2c53d0f64c ("vdpasim: vDPA device simulator")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Link: https://lore.kernel.org/r/20210715080026.242-1-xieyongji@bytedance.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
2021-08-11 06:44:23 -04:00
..
Makefile vdpa: add vdpa simulator for block device 2021-05-03 04:55:53 -04:00
vdpa_sim.c vdpa_sim: Fix return value check for vdpa_alloc_device() 2021-08-11 06:44:23 -04:00
vdpa_sim.h vdpa_sim: use iova module to allocate IOVA addresses 2021-05-03 04:55:52 -04:00
vdpa_sim_blk.c vdpa_sim_blk: remove duplicate include of linux/blkdev.h 2021-07-03 04:50:50 -04:00
vdpa_sim_net.c vdpa_sim: Skip typecasting from void* 2021-03-14 04:37:36 -04:00