Skip to content
Commit b7a41762 authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Mauro Carvalho Chehab
Browse files

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



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>
parent 75b090a5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment