pmu: fix kernel panic on for_each_pci_dev
authorJekyll Lai <jekyll_lai@wistron.com>
Fri, 15 Jul 2011 13:39:20 +0000 (14:39 +0100)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:36:23 +0000 (12:36 -0800)
Setting pdev initial value to NULL in order to avoid kernel panic
in "for_each_pci_dev()."

Change-Id: I5970ec466c645bf3ebd168b973ccb612dbd424e3
Signed-off-by: Jekyll Lai <jekyll_lai@wistron.com>
arch/x86/platform/mrst/pmu.c

index 4aeb189..e02b4bd 100644 (file)
@@ -581,7 +581,7 @@ static const struct file_operations devices_state_operations = {
  */
 static void pmu_scu_firmware_debug(void)
 {
-       struct pci_dev *pdev;
+       struct pci_dev *pdev = NULL;
 
        for_each_pci_dev(pdev) {
                struct mrst_device *mrst_dev;