media: rc: do not access device via sysfs after rc_unregister_device()
authorSean Young <sean@mess.org>
Sat, 8 Aug 2020 11:38:02 +0000 (13:38 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 28 Aug 2020 12:06:36 +0000 (14:06 +0200)
commita2e2d73fa28136598e84db9d021091f1b98cbb1a
treee58ed1afb1381aa0fed5c6163d37d496a652ebc1
parent4f0835d6677dc69263f90f976524cb92b257d9f4
media: rc: do not access device via sysfs after rc_unregister_device()

Device drivers do not expect to have change_protocol or wakeup
re-programming to be accesed after rc_unregister_device(). This can
cause the device driver to access deallocated resources.

Cc: <stable@vger.kernel.org> # 4.16+
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/rc/rc-main.c