Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: ipu3-cio2: Call cio2_bridge_init() before anything else

Since cio2_bridge_init() may now return -EPROBE_DEFER it is best to
call it before anything else.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

authored by

Hans de Goede and committed by
Mauro Carvalho Chehab
fc2c2045 ae971cca

+5 -5
+5 -5
drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
··· 1713 1713 struct cio2_device *cio2; 1714 1714 int r; 1715 1715 1716 - cio2 = devm_kzalloc(dev, sizeof(*cio2), GFP_KERNEL); 1717 - if (!cio2) 1718 - return -ENOMEM; 1719 - cio2->pci_dev = pci_dev; 1720 - 1721 1716 /* 1722 1717 * On some platforms no connections to sensors are defined in firmware, 1723 1718 * if the device has no endpoints then we can try to build those as ··· 1729 1734 if (r) 1730 1735 return r; 1731 1736 } 1737 + 1738 + cio2 = devm_kzalloc(dev, sizeof(*cio2), GFP_KERNEL); 1739 + if (!cio2) 1740 + return -ENOMEM; 1741 + cio2->pci_dev = pci_dev; 1732 1742 1733 1743 r = pcim_enable_device(pci_dev); 1734 1744 if (r) {