[bug report] drm/amdgpu: add amdgpu_ras.c to support ras (v2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello xinhui pan,

This is a semi-automatic email about new static checker warnings.

The patch dbd249c24427: "drm/amdgpu: add amdgpu_ras.c to support ras 
(v2)" from Oct 31, 2018, leads to the following Smatch complaint:

    drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1215 amdgpu_ras_add_bad_pages()
    warn: variable dereferenced before check 'con' (see line 1211)

    drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1247 amdgpu_ras_reserve_bad_pages()
    warn: variable dereferenced before check 'con' (see line 1242)


drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
  1210		struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
  1211		struct ras_err_handler_data *data = con->eh_data;
                                                    ^^^^^^^^^^^^
Dereference

  1212		int i = pages;
  1213		int ret = 0;
  1214	
  1215		if (!con || !data || !bps || pages <= 0)
                    ^^^^
Check

  1216			return 0;
  1217	

regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux