Jia Hongtao-B38951 wrote:
quoted
quoted
+#ifdef CONFIG_SUSPEND
+static int fsl_pci_resume(struct platform_device *pdev)
+{
+ struct pci_controller *hose;
+ struct resource pci_rsrc;
+
+ hose = pci_find_hose_for_OF_device(pdev->dev.of_node);
+ of_address_to_resource(pdev->dev.of_node, 0, &pci_rsrc);
+ setup_pci_atmu(hose, &pci_rsrc);
+
+ return 0;
+}
Some of these functions can fail, so they should return an error code if
they do.
I checked the of_address_to_resource function now.
Is that necessary to check other two fuctions?
Yes, check to ensure that 'hose' is not NULL.
--
Timur Tabi
Linux kernel developer at Freescale