Thread (4 messages) flat view 4 messages, 3 authors, 2012-11-05

Re: [linuxppc-release] [PATCH] powerpc/fsl-pci: Add PCI controller ATMU PM support

From: Timur Tabi <hidden>
Date: 2012-11-05 19:18:56

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help