commit | 4c3b89effc281704d5395282c800c45e453235f6 | [log] [tgz] |
---|---|---|
author | Alistair Popple <alistair@popple.id.au> | Mon Apr 03 19:51:43 2017 +1000 |
committer | Michael Ellerman <mpe@ellerman.id.au> | Mon Apr 03 23:36:00 2017 +1000 |
tree | 080556b55fad008b4111755f12a41fbff31f6c5a | |
parent | 2475a2b6c877a0c8d1ca42c3f2b30f8ce518ac0b [diff] |
powerpc/powernv: Add sanity checks to pnv_pci_get_{gpu|npu}_dev The pnv_pci_get_{gpu|npu}_dev functions are used to find associations between nvlink PCIe devices and standard PCIe devices. However they lacked basic sanity checking which results in NULL pointer dereferencing if they are incorrect called can be harder to spot than an explicit WARN_ON. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>