Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
* [PATCH] media: nxp: imx8-isi: avoid duplicate media device on rebind
@ 2026-12-04 22:45 Ihor Matushchak
  2026-12-04 22:56 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Ihor Matushchak @ 2026-12-04 22:45 UTC (permalink / raw)
  To: laurent.pinchart, mchehab, linux-media, imx, linux-arm-kernel
  Cc: Frank.Li, s.hauer, kernel, festevam, Ihor Matushchak

The async notifier completes every time when a remote subdev is unbound and
bound back. Skip media device registration if it's already registered to
avoid creating an additional /dev/media* node on each rebind.

Signed-off-by: Ihor Matushchak <ihor.matushchak@foobox.net>
---
 drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
index 2005584a1215..7c22413b1be7 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
@@ -90,6 +90,9 @@ static int mxc_isi_async_notifier_complete(struct v4l2_async_notifier *notifier)
 		return ret;
 	}
 
+	if (media_devnode_is_registered(isi->media_dev.devnode))
+		return 0;
+
 	return media_device_register(&isi->media_dev);
 }
 
-- 
2.53.0


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

* Re: [PATCH] media: nxp: imx8-isi: avoid duplicate media device on rebind
  2026-12-04 22:45 [PATCH] media: nxp: imx8-isi: avoid duplicate media device on rebind Ihor Matushchak
@ 2026-12-04 22:56 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-12-04 22:56 UTC (permalink / raw)
  To: Ihor Matushchak, imx; +Cc: Frank.Li, media-ci

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] media: imx8-isi: missing Fixes trailer for bug-fix commit
--

commit cab01a636a2a2d60233280d05f736a181657893f
Author: Ihor Matushchak <ihor.matushchak@foobox.net>

> media: nxp: imx8-isi: avoid duplicate media device on rebind
>
> The async notifier completes every time when a remote subdev is unbound and
> bound back. Skip media device registration if it's already registered to
> avoid creating an additional /dev/media* node on each rebind.
>
> Signed-off-by: Ihor Matushchak <ihor.matushchak@foobox.net>

[Severity: Low]
This fixes duplicate media device registration on subdev rebind in
mxc_isi_async_notifier_complete(). Should this include:

  Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204224502.16170-1-ihor.matushchak@foobox.net?part=1

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

end of thread, other threads:[~2026-12-04 22:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 22:45 [PATCH] media: nxp: imx8-isi: avoid duplicate media device on rebind Ihor Matushchak
2026-12-04 22:56 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox