We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5913320 commit 9e054edCopy full SHA for 9e054ed
drivers/platform/x86/p2sb.c
@@ -65,7 +65,7 @@ static bool p2sb_valid_resource(struct resource *res)
65
/* Copy resource from the first BAR of the device in question */
66
static void p2sb_read_bar0(struct pci_dev *pdev, struct resource *mem)
67
{
68
- struct resource *bar0 = &pdev->resource[0];
+ struct resource *bar0 = pci_resource_n(pdev, 0);
69
70
/* Make sure we have no dangling pointers in the output */
71
memset(mem, 0, sizeof(*mem));
0 commit comments