[PATCH] powerpc/eeh: Add conditional check on notify_resume

Bryant G. Ly bryantly at linux.vnet.ibm.com
Fri Feb 16 05:49:51 AEDT 2018


From: "Juan J. Alvarez" <jjalvare at linux.vnet.ibm.com>

EEH structure is not populated with function
notify resume when running on systems that do not support
it, i.e: BMC. Hence adding a conditional check for NULL for
systems that don't add function notify_resume.

Signed-off-by: Juan J. Alvarez <jjalvare at linux.vnet.ibm.com>
Reviewed-by: Bryant G. Ly <bryantly at linux.vnet.ibm.com>
Tested-by: Carol L. Soto <clsoto at us.ibm.com>
---
 arch/powerpc/kernel/eeh_driver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index beea218..0c0b66f 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -384,7 +384,8 @@ static void *eeh_report_resume(void *data, void *userdata)
 	eeh_pcid_put(dev);
 	pci_uevent_ers(dev, PCI_ERS_RESULT_RECOVERED);
 #ifdef CONFIG_PCI_IOV
-	eeh_ops->notify_resume(eeh_dev_to_pdn(edev));
+	if (eeh_ops->notify_resume && eeh_dev_to_pdn(edev))
+		eeh_ops->notify_resume(eeh_dev_to_pdn(edev));
 #endif
 	return NULL;
 }
-- 
2.7.2



More information about the Linuxppc-dev mailing list