]> git.baikalelectronics.ru Git - kernel.git/commit
media: ov2740: identify module after subdev initialisation
authorBingbu Cao <bingbu.cao@intel.com>
Thu, 13 Jan 2022 00:18:48 +0000 (01:18 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 28 Jan 2022 18:32:49 +0000 (19:32 +0100)
commitc165f701570b6a476bf802cc952e2fc60b9be230
tree62ff56b8242ee9762b2dc1299d3b044fcdb88a9b
parent1b53e2ef34d25602512c77ce7bdd70eb27706c31
media: ov2740: identify module after subdev initialisation

The module identifying will try to get the sub device data which
will be ready after sub device initialisation, so if try to use the
subdev data to deference the client will cause NULL pointer
dereference, this patch move the module identification after
v4l2_i2c_subdev_init() to fix this issue, it also fixes duplicate
module idendification.

Fixes: 3f2dcfcd552c ("media: ov2740: support device probe in non-zero ACPI D state")
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/ov2740.c