From: Dan Carpenter <dan.carpenter@oracle.com>
To: wyatt.wood@amd.com
Cc: amd-gfx@lists.freedesktop.org
Subject: [bug report] drm/amd/display: Add ABM driver implementation
Date: Mon, 6 Apr 2020 14:43:43 +0300 [thread overview]
Message-ID: <20200406114343.GA40464@mwanda> (raw)
Hello Wyatt Wood,
This is a semi-automatic email about new static checker warnings.
The patch 16012806e697: "drm/amd/display: Add ABM driver
implementation" from Feb 20, 2020, leads to the following Smatch
complaint:
drivers/gpu/drm/amd/amdgpu/../display/modules/power/power_helpers.c:661 dmcu_load_iram()
warn: variable dereferenced before check 'dmcu' (see line 659)
drivers/gpu/drm/amd/amdgpu/../display/modules/power/power_helpers.c
658 bool result = false;
659 struct abm *abm = dmcu->ctx->dc->res_pool->abm;
^^^^^^
The patch adds a dereference
660
661 if (dmcu == NULL && abm == NULL)
^^^^^^^^^^^^
662 return false;
663
664 if (dmcu && !dmcu->funcs->is_dmcu_initialized(dmcu))
^^^^
And it also adds NULL checking on dmcu.
665 return true;
666
667 memset(&ram_table, 0, sizeof(ram_table));
668
regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
reply other threads:[~2020-04-06 11:43 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=20200406114343.GA40464@mwanda \
--to=dan.carpenter@oracle.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=wyatt.wood@amd.com \
/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.