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

vhost-vdpa: Call ida_simple_remove() when failed

In function vhost_vdpa_probe(), when code execution fails, we should
call ida_simple_remove() to free ida.

Signed-off-by: Bo Liu <liubo03@inspur.com>
Message-Id: <20220805091254.20026-1-liubo03@inspur.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

authored by

Bo Liu and committed by
Michael S. Tsirkin
ebe6a354 79e0034c

+1
+1
drivers/vhost/vdpa.c
··· 1363 1363 1364 1364 err: 1365 1365 put_device(&v->dev); 1366 + ida_simple_remove(&vhost_vdpa_ida, v->minor); 1366 1367 return r; 1367 1368 } 1368 1369