Message ID | 20240312103422.216484-25-sakari.ailus@linux.intel.com |
---|---|
State | New |
Headers | show |
Series | [v3,01/26] Revert "[media] media: fix media devnode ioctl/syscall and unregister race" | expand |
diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c index dcd40fdab29d..15411682466f 100644 --- a/drivers/media/mc/mc-device.c +++ b/drivers/media/mc/mc-device.c @@ -822,6 +822,9 @@ int __must_check __media_device_register(struct media_device *mdev, ref = kzalloc(sizeof(*mdev->devnode.ref), GFP_KERNEL); if (!ref) return -ENOMEM; + + dev_warn(mdev->dev, + "Set mdev release op to safely release resources!\n"); } /* Register the device node. */
The media device and associated resources may be released only when its memory is no longer used. Warn about drivers not doing this, but instead releasing the resources at driver unbind time. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> --- drivers/media/mc/mc-device.c | 3 +++ 1 file changed, 3 insertions(+)