From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: charlene.liu-5C7GfCeVMHo@public.gmane.org
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [bug report] drm/amd/display: add set and get clock for testing purposes
Date: Mon, 19 Aug 2019 14:51:06 +0300 [thread overview]
Message-ID: <20190819115106.GA24792@mwanda> (raw)
Hello Charlene Liu,
This is a semi-automatic email about new static checker warnings.
The patch 925f566cb7ae: "drm/amd/display: add set and get clock for
testing purposes" from Jun 27, 2019, leads to the following Smatch
complaint:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:3230 dcn10_set_clock()
error: we previously assumed 'dc->clk_mgr' could be null (see line 3226)
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c
3225
3226 if (dc->clk_mgr && dc->clk_mgr->funcs->get_clock)
^^^^^^^^^^
Check for NULL
3227 dc->clk_mgr->funcs->get_clock(dc->clk_mgr,
3228 context, clock_type, &clock_cfg);
This is indented a bit too far.
3229
3230 if (!dc->clk_mgr->funcs->get_clock)
^^^^^^^^^^^^^
This will oops if ->clk_mgr is NULL
3231 return DC_FAIL_UNSUPPORTED_1;
3232
regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
reply other threads:[~2019-08-19 11: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=20190819115106.GA24792@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=charlene.liu-5C7GfCeVMHo@public.gmane.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.