Skip to content
Commit af6bc0dc authored by chengkaitao's avatar chengkaitao Committed by Greg Kroah-Hartman
Browse files

virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed

[ Upstream commit a58a7f97

 ]

The reference must be released when device_register(&vm_cmdline_parent)
failed. Add the corresponding 'put_device()' in the error handling path.

Signed-off-by: default avatarchengkaitao <pilgrimtao@gmail.com>
Message-Id: <20220602005542.16489-1-chengkaitao@didiglobal.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6759554f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment