[Intel-gfx] [bug report] drm/i915/gvt: replace the gvt_err with gvt_vgpu_err

Dan Carpenter dan.carpenter at oracle.com
Wed Mar 22 11:24:02 UTC 2017


Hello Tina Zhang,

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

The patch 695fbc08d80f: "drm/i915/gvt: replace the gvt_err with 
gvt_vgpu_err" from Mar 10, 2017, leads to the following Smatch 
complaint:

drivers/gpu/drm/i915/gvt/kvmgt.c:1344 kvmgt_guest_exit()
	 warn: variable dereferenced before check 'info' (see line 1342)

drivers/gpu/drm/i915/gvt/kvmgt.c
  1341	{
  1342		struct intel_vgpu *vgpu = info->vgpu;
                                          ^^^^^^^^^^
Patch adds a new dereference.

  1343	
  1344		if (!info) {
                    ^^^^^
Existing check.

  1345			gvt_vgpu_err("kvmgt_guest_info invalid\n");
  1346			return false;

regards,
dan carpenter


More information about the Intel-gfx mailing list