]> git.baikalelectronics.ru Git - 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)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 13 Nov 2019 05:57:57 +0000 (16:57 +1100)
commit7a4599f7c441e453c733054d156828db58245f3e
tree2b4dc4842bd70fa4647a5a08d423f02e9066f06a
parent3f5b883a1db6b0cf754c0c04d0e258921f132752
PCI: rpaphp: Fix up pointer to first drc-info entry

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
drivers/pci/hotplug/rpaphp_core.c