]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
PCI: rpaphp: Fix up pointer to first drc-info entry
authorTyrel Datwyler <tyreld@linux.ibm.com>
Mon, 11 Nov 2019 05:21:31 +0000 (23:21 -0600)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 05:05:10 +0000 (00:05 -0500)
commit60cb9a5ee0b5b9a8d2e2b1dca9b764bad2312471
treecbc76059b09d669c3e541278f111ae71cd4ad292
parent1a1cea08bd0bfac16745e09136fb1f8e2a052331
PCI: rpaphp: Fix up pointer to first drc-info entry

BugLink: https://bugs.launchpad.net/bugs/1860816
[ Upstream commit 9723c25f99aff0451cfe6392e1b9fdd99d0bf9f0 ]

The first entry of the ibm,drc-info property is an int encoded count
of the number of drc-info entries that follow. The "value" pointer
returned by of_prop_next_u32() is still pointing at the this value
when we call of_read_drc_info_cell(), but the helper function
expects that value to be pointing at the first element of an entry.

Fix up by incrementing the "value" pointer to point at the first
element of the first drc-info entry prior.

Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1573449697-5448-5-git-send-email-tyreld@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/pci/hotplug/rpaphp_core.c