Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 525552a0 authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Greg Kroah-Hartman
Browse files

media: ov2680: don't register the v4l2 subdevice before checking chip ID



[ Upstream commit b7a417628abf49dae98cb80a272dc133b0e4d1a3 ]

The driver registers the v4l2 subdevice before attempting to power on the
chip and checking its ID. This means that a media device driver that it's
waiting for this subdevice to be bound, will prematurely expose its media
device node to userspace because if something goes wrong the media entity
will be cleaned up again on the ov2680 probe function.

This also simplifies the probe function error path since no initialization
is made before attempting to enable the resources or checking the chip ID.

Fixes: 3ee47cad ("media: ov2680: Add Omnivision OV2680 sensor driver")

Signed-off-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f4683c89
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment