All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: alexander.deucher@amd.com
Cc: dri-devel@lists.freedesktop.org
Subject: [bug report] drm/amd/powerplay/smu7: fix checks in smu7_get_evv_voltages (v2)
Date: Tue, 15 Nov 2016 15:50:25 +0300	[thread overview]
Message-ID: <20161115125024.GA28912@mwanda> (raw)

Hello Alex Deucher,

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

The patch 0f12f73c5175: "drm/amd/powerplay/smu7: fix checks in 
smu7_get_evv_voltages (v2)" from Nov 9, 2016, leads to the following 
Smatch complaint:

drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c:1486 smu7_get_evv_voltages()
	 warn: variable dereferenced before check 'table_info' (see line 1483)

drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c
  1482				    && !phm_get_sclk_for_voltage_evv(hwmgr,
  1483							table_info->vddgfx_lookup_table, vv_id, &sclk)) {
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1484					if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
  1485								PHM_PlatformCaps_ClockStretcher)) {
  1486						if (table_info == NULL)
                                                    ^^^^^^^^^^^^^^^^^^
We can't reach this check unless we have already dereferenced
"table_info" so something must be wrong.

  1487							return -EINVAL;
  1488						sclk_table = table_info->vdd_dep_on_sclk;

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

                 reply	other threads:[~2016-11-15 12:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161115125024.GA28912@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=alexander.deucher@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.