]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
Merge tag 'char-misc-4.15-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_vf_error.c
index 746b81339835eccf1b52c166974b0ce090c54758..7f7097931c6f86ae2c73b9b0a7188527360e2510 100644 (file)
@@ -31,7 +31,12 @@ void amdgpu_vf_error_put(struct amdgpu_device *adev,
                         uint64_t error_data)
 {
        int index;
-       uint16_t error_code = AMDGIM_ERROR_CODE(AMDGIM_ERROR_CATEGORY_VF, sub_error_code);
+       uint16_t error_code;
+
+       if (!amdgpu_sriov_vf(adev))
+               return;
+
+       error_code = AMDGIM_ERROR_CODE(AMDGIM_ERROR_CATEGORY_VF, sub_error_code);
 
        mutex_lock(&adev->virt.vf_errors.lock);
        index = adev->virt.vf_errors.write_count % AMDGPU_VF_ERROR_ENTRY_SIZE;
This page took 0.033877 seconds and 4 git commands to generate.