]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
samples: vfio-mdev: fix error handing in mdpy_fb_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Thu, 20 May 2021 13:36:41 +0000 (13:36 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 15 Jul 2021 17:27:01 +0000 (19:27 +0200)
commit4e5575620c5782515ef29059dd57a7122c25aaf6
tree2b45537a1b28e15a3aed0ed07e53a7c8f2a08ea8
parentb5528a78fb3a3638bdd2e2ebdb9a112304a51a16
samples: vfio-mdev: fix error handing in mdpy_fb_probe()

BugLink: https://bugs.launchpad.net/bugs/1932957
[ Upstream commit 752774ce7793a1f8baa55aae31f3b4caac49cbe4 ]

Fix to return a negative error code from the framebuffer_alloc() error
handling case instead of 0, also release regions in some error handing
cases.

Fixes: cacade1946a4 ("sample: vfio mdev display - guest driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Message-Id: <20210520133641.1421378-1-weiyongjun1@huawei.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
samples/vfio-mdev/mdpy-fb.c