]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jun 2021 11:24:04 +0000 (13:24 +0200)
commitf12bd9caafedebd8e468cc3ec1dcee1920d7a9d2
tree2b551a9b6883a343203c3ac47d0715dfc2e74870
parent2b2ca3ee36e4e40d98c01b41a5819243197d4609
samples: vfio-mdev: fix error handing in mdpy_fb_probe()

[ 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>
samples/vfio-mdev/mdpy-fb.c