From: Dan Carpenter <dan.carpenter@oracle.com>
To: David Airlie <airlied@linux.ie>, Jammy Zhou <Jammy.Zhou@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
kernel-janitors@vger.kernel.org, Rex Zhu <Rex.Zhu@amd.com>,
dri-devel@lists.freedesktop.org
Subject: [patch] drm/amd/powerplay: fix a reversed condition
Date: Mon, 04 Jan 2016 20:42:55 +0000 [thread overview]
Message-ID: <20160104204255.GB19867@mwanda> (raw)
This test was reversed so it would end up leading to a NULL dereference.
Fixes: 4630f0faae80 ('drm/amd/powerplay: add Carrizo smu support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c
index e74023b..873a8d2 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c
@@ -818,7 +818,7 @@ static int cz_smu_fini(struct pp_smumgr *smumgr)
return -EINVAL;
cz_smu = (struct cz_smumgr *)smumgr->backend;
- if (!cz_smu) {
+ if (cz_smu) {
cgs_free_gpu_mem(smumgr->device,
cz_smu->toc_buffer.handle);
cgs_free_gpu_mem(smumgr->device,
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: David Airlie <airlied@linux.ie>, Jammy Zhou <Jammy.Zhou@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
kernel-janitors@vger.kernel.org, Rex Zhu <Rex.Zhu@amd.com>,
dri-devel@lists.freedesktop.org
Subject: [patch] drm/amd/powerplay: fix a reversed condition
Date: Mon, 4 Jan 2016 23:42:55 +0300 [thread overview]
Message-ID: <20160104204255.GB19867@mwanda> (raw)
This test was reversed so it would end up leading to a NULL dereference.
Fixes: 4630f0faae80 ('drm/amd/powerplay: add Carrizo smu support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c
index e74023b..873a8d2 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c
@@ -818,7 +818,7 @@ static int cz_smu_fini(struct pp_smumgr *smumgr)
return -EINVAL;
cz_smu = (struct cz_smumgr *)smumgr->backend;
- if (!cz_smu) {
+ if (cz_smu) {
cgs_free_gpu_mem(smumgr->device,
cz_smu->toc_buffer.handle);
cgs_free_gpu_mem(smumgr->device,
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2016-01-04 20:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-04 20:42 Dan Carpenter [this message]
2016-01-04 20:42 ` [patch] drm/amd/powerplay: fix a reversed condition Dan Carpenter
2016-01-04 21:17 ` Alex Deucher
2016-01-04 21:17 ` Alex Deucher
2016-01-05 9:06 ` SF Markus Elfring
2016-01-05 9:06 ` SF Markus Elfring
2016-01-05 11:14 ` Dan Carpenter
2016-01-05 11:14 ` Dan Carpenter
2016-01-05 12:36 ` SF Markus Elfring
2016-01-05 12:36 ` SF Markus Elfring
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=20160104204255.GB19867@mwanda \
--to=dan.carpenter@oracle.com \
--cc=Jammy.Zhou@amd.com \
--cc=Rex.Zhu@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.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.