mirror of
https://github.com/torvalds/linux.git
synced 2026-09-12 12:34:02 +02:00
vdpa: octeon_ep: Check dev_set_name() in dev add
Handle dev_set_name() failures before registering the vDPA device so allocation is unwound through the existing put_device() path. Signed-off-by: Xiong Weimin <xiongweimin@kylinos.cn> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260804092636.1344431-1-xiongweimin@kylinos.cn>
This commit is contained in:
parent
4d470be711
commit
6519ca2351
|
|
@ -600,6 +600,8 @@ static int octep_vdpa_dev_add(struct vdpa_mgmt_dev *mdev, const char *name,
|
|||
ret = dev_set_name(&vdpa_dev->dev, "%s", name);
|
||||
else
|
||||
ret = dev_set_name(&vdpa_dev->dev, "vdpa%u", vdpa_dev->index);
|
||||
if (ret)
|
||||
goto vdpa_dev_put;
|
||||
|
||||
ret = _vdpa_register_device(&oct_vdpa->vdpa, oct_hw->nr_vring);
|
||||
if (ret) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user