Files
linux-nv-oot/drivers/platform/tegra/rtcpu
Jon Hunter 6b6d1e009a camera-diagnostics: Fix missing release function
The camera-diagnostic driver is missing a release function for the IVC
channel device that it is creating. This causes the following WARNING to
be observed when probing the camera-diagnostic driver fails ...

 ------------[ cut here ]------------
 Device 'camera-diag' does not have a release() function, it is broken
 and must be fixed. See Documentation/core-api/kobject.rst.
 WARNING: CPU: 8 PID: 756 at drivers/base/core.c:2517 device_release+0x88/0xa8
 ...
 Call trace:
  device_release+0x88/0xa8
  kobject_put+0xac/0x150
  put_device+0x14/0x34
  __mod_of__camera_diag_of_match_device_table+0x602514/0x6033a0
   [camera_diagnostics]
  tegra_ivc_bus_boot_sync+0x204/0x28c [ivc_bus]
  really_probe+0x150/0x2c8
  __driver_probe_device+0x78/0x134
  driver_probe_device+0x3c/0x164
  __driver_attach+0x98/0x1c4
  bus_for_each_dev+0x7c/0xf4
  driver_attach+0x24/0x38
  bus_add_driver+0xec/0x218
  driver_register+0x5c/0x13c
  tegra_ivc_driver_register+0x10/0x1c [ivc_bus]
  init_module+0x18/0x1000
  [camera_diagnostics]
  do_one_initcall+0x58/0x318
  do_init_module+0x58/0x1ec
  load_module+0x1f04/0x2000
  init_module_from_file+0x88/0xd4
  __arm64_sys_finit_module+0x148/0x330
  invoke_syscall+0x48/0x134
  el0_svc_common.constprop.0+0x40/0xf0
  do_el0_svc+0x1c/0x30
  el0_svc+0x30/0xb8
  el0t_64_sync_handler+0x130/0x13c
  el0t_64_sync+0x194/0x198
 ---[ end trace 0000000000000000 ]---

Ideally we would use the 'tegra_ivc_channel_release()' function as the
release function but because the camera-diagnostic driver does not call
'tegra_ivc_channel_create()' to create the channel and does not actually
need to free any memory, simply define a new empty function that can be
called.

Bug 5489551

Change-Id: I6a7de9893af0167409af79599b61faf005047b0e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3443095
(cherry picked from commit f75c0f228ca4f1a4c17266cb97be2db63b25a592)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3453753
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-09-17 18:56:57 -07:00
..