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:Ma Ke <make24@iscas.ac.cn> Signed-off-by:
Sean Young <sean@mess.org> Signed-off-by:
Hans Verkuil <hverkuil+cisco@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
Please sign in to comment