Patchwork [GIT] : Networking

login
register
mail settings
Submitter Jesse Barnes
Date April 7, 2009, 1:33 a.m.
Message ID <20090406183324.6997e70d@hobbes>
Download mbox | patch
Permalink /patch/25656/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Jesse Barnes - April 7, 2009, 1:33 a.m.
On Mon, 6 Apr 2009 18:25:31 -0700 (PDT)
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> 
> 
> The sky2 driver is buggered (by the previous pull, I presume). Some
> PCI interaction. NULL pointer dereference at boot.

Hopefully fixed by this patch in my for-linus branch?

Patch

diff --git a/drivers/pci/access.c b/drivers/pci/access.c
index 3814447..64dd7df 100644
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -356,7 +356,8 @@  int pci_vpd_truncate(struct pci_dev *dev, size_t size)
 		return -EINVAL;
 
 	dev->vpd->len = size;
-	dev->vpd->attr->size = size;
+	if (dev->vpd->attr)
+		dev->vpd->attr->size = size;
 
 	return 0;
 }