* [PATCH 2/4] x86: platform: olpc: fix potential NULL pointer dereference
@ 2010-11-18 18:16 Vasiliy Kulikov
0 siblings, 0 replies; only message in thread
From: Vasiliy Kulikov @ 2010-11-18 18:16 UTC (permalink / raw)
To: kernel-janitors
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, linux-kernel
pdev is never NULL here, instead we should check pcidev as
it is returned from pci_get_device() and may be NULL.
This code dereferences NULL in pci_enable_device_io() call.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
---
Compile tested.
arch/x86/platform/olpc/olpc-xo1.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/platform/olpc/olpc-xo1.c b/arch/x86/platform/olpc/olpc-xo1.c
index f5442c0..c35d03a 100644
--- a/arch/x86/platform/olpc/olpc-xo1.c
+++ b/arch/x86/platform/olpc/olpc-xo1.c
@@ -94,7 +94,7 @@ static int __devinit olpc_xo1_probe(struct platform_device *pdev)
pcidev = pci_get_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA,
NULL);
- if (!pdev)
+ if (!pcidev)
return -ENODEV;
r = setup_bases(pcidev);
--
1.7.0.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-11-18 18:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18 18:16 [PATCH 2/4] x86: platform: olpc: fix potential NULL pointer dereference Vasiliy Kulikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®