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

Configure Feed

Select the types of activity you want to include in your feed.

iommu/omap: simplify probe_device() error handling

Simplify the probe_device() error handling by dropping the iommu OF node
reference sooner.

Acked-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>

authored by

Johan Hovold and committed by
Joerg Roedel
13e1d629 b5870691

+1 -4
+1 -4
drivers/iommu/omap-iommu.c
··· 1668 1668 } 1669 1669 1670 1670 pdev = of_find_device_by_node(np); 1671 + of_node_put(np); 1671 1672 if (!pdev) { 1672 - of_node_put(np); 1673 1673 kfree(arch_data); 1674 1674 return ERR_PTR(-ENODEV); 1675 1675 } ··· 1677 1677 oiommu = platform_get_drvdata(pdev); 1678 1678 put_device(&pdev->dev); 1679 1679 if (!oiommu) { 1680 - of_node_put(np); 1681 1680 kfree(arch_data); 1682 1681 return ERR_PTR(-EINVAL); 1683 1682 } 1684 1683 1685 1684 tmp->iommu_dev = oiommu; 1686 - 1687 - of_node_put(np); 1688 1685 } 1689 1686 1690 1687 dev_iommu_priv_set(dev, arch_data);