]> git.baikalelectronics.ru Git - kernel.git/commit
media: imon: drop references only after device is no longer used
authorOliver Neukum <oneukum@suse.com>
Thu, 28 Apr 2022 13:34:55 +0000 (15:34 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 09:02:23 +0000 (11:02 +0200)
commit341c84c59d1b64a87d574eb1800fa92d8fe66f21
tree3cea291da9ddd07c3855ff45287121ce7930b732
parent87d7cc0782f7aab0ee76e449f3dab0c2f01cb4ee
media: imon: drop references only after device is no longer used

The point of using get/put_device() is to keep references
for as long as the device may be in use. That means dropping
them must be the penultimate action right before freeing the memory.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/rc/imon.c