linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.9 01/18] media: omap3isp: Unregister media device as first
@ 2018-11-29  6:03 Sasha Levin
  2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 02/18] iommu/vt-d: Fix NULL pointer dereference in prq_event_thread() Sasha Levin
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: Sasha Levin @ 2018-11-29  6:03 UTC (permalink / raw)
  To: stable, linux-kernel
  Cc: Sakari Ailus, Mauro Carvalho Chehab, Sasha Levin, linux-media

From: Sakari Ailus <sakari.ailus@linux.intel.com>

[ Upstream commit 30efae3d789cd0714ef795545a46749236e29558 ]

While there are issues related to object lifetime management, unregister the
media device first when the driver is being unbound. This is slightly
safer.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/media/platform/omap3isp/isp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
index 1e98b4845ea1..a21b12c5c085 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -1591,6 +1591,8 @@ static void isp_pm_complete(struct device *dev)
 
 static void isp_unregister_entities(struct isp_device *isp)
 {
+	media_device_unregister(&isp->media_dev);
+
 	omap3isp_csi2_unregister_entities(&isp->isp_csi2a);
 	omap3isp_ccp2_unregister_entities(&isp->isp_ccp2);
 	omap3isp_ccdc_unregister_entities(&isp->isp_ccdc);
@@ -1601,7 +1603,6 @@ static void isp_unregister_entities(struct isp_device *isp)
 	omap3isp_stat_unregister_entities(&isp->isp_hist);
 
 	v4l2_device_unregister(&isp->v4l2_dev);
-	media_device_unregister(&isp->media_dev);
 	media_device_cleanup(&isp->media_dev);
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2018-11-29  6:04 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-29  6:03 [PATCH AUTOSEL 4.9 01/18] media: omap3isp: Unregister media device as first Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 02/18] iommu/vt-d: Fix NULL pointer dereference in prq_event_thread() Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 03/18] brcmutil: really fix decoding channel info for 160 MHz bandwidth Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 04/18] iommu/ipmmu-vmsa: Fix crash on early domain free Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 05/18] can: rcar_can: Fix erroneous registration Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 06/18] HID: input: Ignore battery reported by Symbol DS4308 Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 07/18] batman-adv: Expand merged fragment buffer for full packet Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 08/18] bnx2x: Assign unique DMAE channel number for FW DMAE transactions Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 09/18] qed: Fix PTT leak in qed_drain() Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 10/18] qed: Fix reading wrong value in loop condition Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 11/18] net/mlx4_core: Zero out lkey field in SW2HW_MPT fw command Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 12/18] net/mlx4_core: Fix uninitialized variable compilation warning Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 13/18] net/mlx4: Fix UBSAN warning of signed integer overflow Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 14/18] mtd: rawnand: qcom: Namespace prefix some commands Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 15/18] net: faraday: ftmac100: remove netif_running(netdev) check before disabling interrupts Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 16/18] iommu/vt-d: Use memunmap to free memremap Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 17/18] team: no need to do team_notify_peers or team_mcast_rejoin when disabling port Sasha Levin
2018-11-29  6:03 ` [PATCH AUTOSEL 4.9 18/18] net: amd: add missing of_node_put() Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).