Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-14 12:10:02 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-14 12:30:22 +0200
commit2cd81ccfc9ca12bf61c1f6ab2abc0d0fc7c5abd1 (patch)
tree512dc09008fcc7d2f48619056f38ccb9ed3d73c0
parent1c2118a91501b29fb08d007184dd4e449a831ec9 (diff)
vfio/mdev: Avoid release parent reference during error path
(bsc#1051510). suse-commit: 6b9fbbbeb8baa315053b6ab8a213969fdbc51d6e
-rw-r--r--drivers/vfio/mdev/mdev_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c
index 126991046eb7..fb0b3160c18d 100644
--- a/drivers/vfio/mdev/mdev_core.c
+++ b/drivers/vfio/mdev/mdev_core.c
@@ -210,6 +210,7 @@ int mdev_register_device(struct device *dev, const struct mdev_parent_ops *ops)
/* Check for duplicate */
parent = __find_parent_device(dev);
if (parent) {
+ parent = NULL;
ret = -EEXIST;
goto add_dev_err;
}