Commit 83fc1f68 authored by Ma Ke's avatar Ma Ke Committed by Greg Kroah-Hartman
Browse files

media: lirc: Fix error handling in lirc_register()



[ Upstream commit 4f4098c5 ]

When cdev_device_add() failed, calling put_device() to explicitly
release dev->lirc_dev. Otherwise, it could cause the fault of the
reference count.

Found by code review.

Cc: stable@vger.kernel.org
Fixes: a6ddd4fe ("media: lirc: remove last remnants of lirc kapi")
Signed-off-by: default avatarMa Ke <make24@iscas.ac.cn>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarHans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bc35a8cc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment