diff options
author | Vaibhav Jain <vaibhav@linux.vnet.ibm.com> | 2017-11-23 09:08:57 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-11-23 23:08:34 +1100 |
commit | 12841f87b7a8ceb3d54f171660f72a86941bfcb3 (patch) | |
tree | 224d2308470a53e16aa43fc561c325798cef2de1 /drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c | |
parent | 4d6c51b107cc73b15a377224549aa5593f90df89 (diff) |
cxl: Check if vphb exists before iterating over AFU devices
During an eeh a kernel-oops is reported if no vPHB is allocated to the
AFU. This happens as during AFU init, an error in creation of vPHB is
a non-fatal error. Hence afu->phb should always be checked for NULL
before iterating over it for the virtual AFU pci devices.
This patch fixes the kenel-oops by adding a NULL pointer check for
afu->phb before it is dereferenced.
Fixes: 9e8df8a21963 ("cxl: EEH support")
Cc: stable@vger.kernel.org # v4.3+
Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c')
0 files changed, 0 insertions, 0 deletions