summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2019-03-04 04:45:57 -0500
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-07-25 11:00:48 -0400
commit706c0cffaf2a1b5844fc99e62c09a21f7a7acfdf (patch)
tree7dcd3b6ba8bac4660dd321f630d207c4359dc463 /drivers/media/pci
parentf6a5242b7cf20bf34e5362896df310a35ba3b90b (diff)
downloadlinux-706c0cffaf2a1b5844fc99e62c09a21f7a7acfdf.tar.bz2
media: ipu3-cio2: Proceed with notifier init even if there are no subdevs
The notifier may be registered even if there are no subdevs. Do that to simplify the code. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r--drivers/media/pci/intel/ipu3/ipu3-cio2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
index 52bd35c240dd..6041d9e261de 100644
--- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c
+++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
@@ -1506,9 +1506,10 @@ static int cio2_notifier_init(struct cio2_device *cio2)
if (ret < 0)
goto out;
- if (list_empty(&cio2->notifier.asd_list))
- return -ENODEV; /* no endpoint */
-
+ /*
+ * Proceed even without sensors connected to allow the device to
+ * suspend.
+ */
cio2->notifier.ops = &cio2_async_ops;
ret = v4l2_async_notifier_register(&cio2->v4l2_dev, &cio2->notifier);
if (ret) {
@@ -1815,8 +1816,7 @@ static int cio2_pci_probe(struct pci_dev *pci_dev,
/* Register notifier for subdevices we care */
r = cio2_notifier_init(cio2);
- /* Proceed without sensors connected to allow the device to suspend. */
- if (r && r != -ENODEV)
+ if (r)
goto fail_cio2_queue_exit;
r = devm_request_irq(&pci_dev->dev, pci_dev->irq, cio2_irq,