Skip to content

Commit

Permalink
powerpc: Fix oops on some machines due to incorrect pr_debug()
Browse files Browse the repository at this point in the history
Recently, a patch left DEBUG enabled in the powerpc common PCI code,
resulting in an old bug in a pr_debug() statement to show up and cause
a NULL dereference on some machines.

This fixes the pr_debug() statement and reverts to DEBUG not being
force-enabled in that file.

Signed-off-by: Benjamin Herrenschmidt <[email protected]>
  • Loading branch information
ozbenh committed Feb 2, 2009
1 parent 309ea62 commit 59b608c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/powerpc/kernel/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* 2 of the License, or (at your option) any later version.
*/

#define DEBUG

#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/string.h>
Expand Down Expand Up @@ -258,7 +256,8 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
} else {
pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n",
oirq.size, oirq.specifier[0], oirq.specifier[1],
oirq.controller->full_name);
oirq.controller ? oirq.controller->full_name :
"<default>");

virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
oirq.size);
Expand Down

0 comments on commit 59b608c

Please sign in to comment.