From: Olof Johansson Date: Wed, 11 Jan 2006 20:02:58 +0000 (-0600) Subject: [PATCH] powerpc: remove warning in EEH code X-Git-Tag: v2.6.16-rc1~184^2~14 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea183a957abea8e05530a4536a9c2db16e9fdd85;p=linux-2.6 [PATCH] powerpc: remove warning in EEH code Remove warning in eeh code about mixed variables and code. Signed-off-by: Olof Johansson Acked-by: Linas Vepstas Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 17cea7f2af..83578313ee 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -208,10 +208,11 @@ static void __eeh_mark_slot (struct device_node *dn, int mode_flag) { while (dn) { if (PCI_DN(dn)) { - PCI_DN(dn)->eeh_mode |= mode_flag; - /* Mark the pci device driver too */ struct pci_dev *dev = PCI_DN(dn)->pcidev; + + PCI_DN(dn)->eeh_mode |= mode_flag; + if (dev && dev->driver) dev->error_state = pci_channel_io_frozen;